lib/libconfigfile/configfile.cpp: add deleteKey()

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3567e97e73
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-09 (Tue, 09 Sep 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2014-09-09 15:20:05 +04:00
parent dc9164a431
commit 8526f8fab6
2 changed files with 9 additions and 0 deletions

View File

@@ -451,3 +451,11 @@ void CConfigFile::setStringVector(const std::string & key, const std::vector<std
}
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
}
bool CConfigFile::deleteKey(const std::string & key)
{
bool ret = configData.erase(key) != 0;
if (ret)
modifiedFlag = true;
return ret;
}

View File

@@ -106,6 +106,7 @@ class CConfigFile
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
ConfigDataMap getConfigDataMap(){ return configData; }
bool deleteKey(const std::string & key);
};
#endif /* __configfile_h__ */