Skip to content

Commit

Permalink
Removes unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
FiniteSingularity committed Jul 5, 2024
1 parent aa3b52e commit cacc51c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
5 changes: 2 additions & 3 deletions src/quick-access-dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,11 @@ void QuickAccessDock::SourceDestroyed()
}
}

void QuickAccessDock::SourceRename(obs_source_t *source, std::string newName,
std::string prevName)
void QuickAccessDock::SourceRename(obs_source_t *source)
{
// Dynamic sources are handled from scene item add/delete events
if (_switchingSC || !_widget) {
return;
}
_widget->SourceRename(source, newName, prevName);
_widget->SourceRename(source);
}
3 changes: 1 addition & 2 deletions src/quick-access-dock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class QuickAccessDock : public QWidget {

void SourceCreated(obs_source_t *source);
void SourceDestroyed();
void SourceRename(obs_source_t *source, std::string newName,
std::string prevName);
void SourceRename(obs_source_t *source);
void CleanupSourceHandlers();

private:
Expand Down
8 changes: 2 additions & 6 deletions src/quick-access-utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,11 @@ void QuickAccessUtility::SourceRename(void *data, calldata_t *params)
UNUSED_PARAMETER(data);
obs_source_t *source =
static_cast<obs_source_t *>(calldata_ptr(params, "source"));
std::string newName = calldata_string(params, "new_name");
std::string prevName = calldata_string(params, "prev_name");
QMetaObject::invokeMethod(
QCoreApplication::instance()->thread(),
[source, newName, prevName]() {
QCoreApplication::instance()->thread(), [source]() {
for (auto &dock : qau->_docks) {
if (dock) {
dock->SourceRename(source, newName,
prevName);
dock->SourceRename(source);
}
}
});
Expand Down
3 changes: 1 addition & 2 deletions src/quick-access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,7 @@ void QuickAccess::RemoveNullSources()
blog(LOG_INFO, "SIZE OF LIST AFTER: %i", _sourceList->count());
}

void QuickAccess::SourceRename(obs_source_t *source, std::string newName,
std::string prevName)
void QuickAccess::SourceRename(obs_source_t *source)
{
for (int i = 0; i < _sourceList->count(); i++) {
QListWidgetItem *item = _sourceList->item(i);
Expand Down
3 changes: 1 addition & 2 deletions src/quick-access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ class QuickAccess : public QListWidget {
static void ItemRemovedFromScene(void *data, calldata_t *params);

void RemoveNullSources();
void SourceRename(obs_source_t *source, std::string newName,
std::string prevName);
void SourceRename(obs_source_t *source);

private:
QuickAccessDock *_dock;
Expand Down

0 comments on commit cacc51c

Please sign in to comment.