void CPeripheral::SetSetting(const CStdString &strKey, bool bValue) { map<CStdString, CSetting *>::iterator it = m_settings.find(strKey); if (it != m_settings.end() && (*it).second->GetType() == SETTINGS_TYPE_BOOL) { CSettingBool *boolSetting = (CSettingBool *) (*it).second; if (boolSetting) { bool bChanged(boolSetting->GetData() != bValue); boolSetting->SetData(bValue); if (bChanged && m_bInitialised) OnSettingChanged(strKey); } } }