MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / getSettingByKey

Method getSettingByKey

lib/SettingsService/src/SettingsService.cpp:566–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566KeyValue* SettingsService::getSettingByKey(const char* key)
567{
568 std::vector<KeyValue*>::const_iterator it;
569 KeyValue* keyValuePair = nullptr;
570
571 for (it = m_keyValueList.begin(); it != m_keyValueList.end(); ++it)
572 {
573 if (nullptr != *it)
574 {
575 if (0 == strcmp((*it)->getKey(), key))
576 {
577 keyValuePair = *it;
578 break;
579 }
580 }
581 }
582
583 return keyValuePair;
584}
585
586bool SettingsService::registerSetting(KeyValue* setting)
587{

Calls 3

beginMethod · 0.45
endMethod · 0.45
getKeyMethod · 0.45

Tested by

no test coverage detected