上传文件至 'source-code/source/plugins/TLAC/FileSystem'
New function added "GetStringValue" to get string value from the config file
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user