Quell more compiler warnings

bool solo is now initialized properly and get_snapshot_by_name always
returns a MixerSnapshot pointer
This commit is contained in:
Nikolaus Gullotta 2019-09-09 14:45:44 -05:00 committed by Nikolaus Gullotta
parent 06302e2e8b
commit 8b59e50980
No known key found for this signature in database
GPG key ID: 565F60578092AA31
2 changed files with 5 additions and 1 deletions

View file

@ -416,6 +416,7 @@ void MixerSnapshot::recall()
bool gain, mute, solo, recenable, select, route_active, monitoring;
state.node.get_property(X_("used-to-share-gain"), gain);
state.node.get_property(X_("mute"), mute);
state.node.get_property(X_("solo"), solo);
state.node.get_property(X_("recenable"), recenable);
state.node.get_property(X_("select"), select);
state.node.get_property(X_("route-active"), route_active);

View file

@ -190,13 +190,16 @@ bool MixerSnapshotManager::demote(MixerSnapshot* snapshot) {
MixerSnapshot* MixerSnapshotManager::get_snapshot_by_name(const string& name, bool global)
{
set<MixerSnapshot*> snapshots_list = global ? _global_snapshots : _local_snapshots;
MixerSnapshot* snapshot;
set<MixerSnapshot*>::iterator it;
for(it = snapshots_list.begin(); it != snapshots_list.end(); it++) {
if((*it)->get_label() == name) {
return (*it);
snapshot = (*it);
break;
}
}
return snapshot;
}
void MixerSnapshotManager::create_snapshot(const string& label, const string& desc, RouteList& rl, bool global)