MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / GetStringValue

Method GetStringValue

base/Config.cpp:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::string CConfig::GetStringValue(const std::string& key) {
68 try {
69 std::unique_lock<std::mutex> lock(_mutex);
70 auto iter = _config_map.find(key);
71 if (iter != _config_map.end()) {
72 return iter->second;
73 }
74 return "";
75
76 } catch (...) {
77 LOG_ERROR("get config string value failed.");
78 return "";
79 }
80}
81
82double CConfig::GetDoubleValue(const std::string& key) {
83 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected