mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
lib/libconfigfile/configfile.cpp: add deleteKey()
Origin commit data
------------------
Commit: 3567e97e73
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-09 (Tue, 09 Sep 2014)
This commit is contained in:
@@ -451,3 +451,11 @@ void CConfigFile::setStringVector(const std::string & key, const std::vector<std
|
|||||||
}
|
}
|
||||||
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
unknownKeyQueryedFlag = tmpUnknownKeyQueryedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CConfigFile::deleteKey(const std::string & key)
|
||||||
|
{
|
||||||
|
bool ret = configData.erase(key) != 0;
|
||||||
|
if (ret)
|
||||||
|
modifiedFlag = true;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@@ -106,6 +106,7 @@ class CConfigFile
|
|||||||
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
|
void setUnknownKeyQueryedFlag(const bool val) { unknownKeyQueryedFlag = val; }
|
||||||
|
|
||||||
ConfigDataMap getConfigDataMap(){ return configData; }
|
ConfigDataMap getConfigDataMap(){ return configData; }
|
||||||
|
bool deleteKey(const std::string & key);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __configfile_h__ */
|
#endif /* __configfile_h__ */
|
||||||
|
Reference in New Issue
Block a user