上传文件至 'source-code/source/plugins/TLAC/FileSystem'

New function added "GetStringValue" to get string value from the config file
This commit is contained in:
zsccat
2020-06-04 12:51:44 +00:00
parent ebc5bc78a1
commit cb8e61b431
2 changed files with 9 additions and 0 deletions
@@ -47,6 +47,14 @@ namespace TLAC::FileSystem
return found ? (float)atof(pair->second.c_str()) : 0.0f;
}
std::string ConfigFile::GetStringValue(const std::string& key)
{
auto pair = ConfigMap.find(key);
bool found = pair != ConfigMap.end();
return found ? pair->second : "";
}
void ConfigFile::Parse(std::ifstream &fileStream)
{
std::string line;