diff --git a/cpp/src/base/ConfigFileReader.cpp b/cpp/src/base/ConfigFileReader.cpp index c0e55e3..0d07318 100644 --- a/cpp/src/base/ConfigFileReader.cpp +++ b/cpp/src/base/ConfigFileReader.cpp @@ -25,15 +25,11 @@ char* CConfigFileReader::GetConfigName(const char* name) return NULL; char* value = NULL; - map::iterator it = m_config_map->begin(); - for ( ; it != m_config_map->end(); it++) + map::iterator it = m_config_map->find(name); + + if(it != m_config_map->end()) { - const char* key = it->first.c_str(); - if (strcmp(key, name) == 0) - { - value = (char*)it->second.c_str(); - break; - } + value = (char*)it->second.c_str(); } return value;