bool CPeripheral::SetSetting(const CStdString &strKey, bool bValue) { bool bChanged(false); map<CStdString, CSetting *>::iterator it = m_settings.find(strKey); if (it != m_settings.end() && (*it).second->GetType() == SettingTypeBool) { CSettingBool *boolSetting = (CSettingBool *) (*it).second; if (boolSetting) { bChanged = boolSetting->GetValue() != bValue; boolSetting->SetValue(bValue); if (bChanged && m_bInitialised) m_changedSettings.insert(strKey); } } return bChanged; }