fix:修正配置删除不完全问题。
This commit is contained in:
@@ -52,8 +52,7 @@ void CGroupIni::get_all_node(StrVec_t& vec)
|
||||
bool CGroupIni::add_item(const OneGroupIni& group)
|
||||
{
|
||||
ini_.SetValue(group.name.c_str(), "MainNodes", group.main_nodes.c_str());
|
||||
ini_.SetValue(group.name.c_str(), "RelativeNodes",
|
||||
group.relative_nodes.c_str());
|
||||
ini_.SetValue(group.name.c_str(), "RelativeNodes", group.relative_nodes.c_str());
|
||||
ini_.SetValue(group.name.c_str(), "ItemKey", group.item_key.c_str());
|
||||
ini_.SetValue(group.name.c_str(), "Properties", group.propertis.c_str());
|
||||
ini_.SetLongValue(group.name.c_str(), "MaxColLen", group.max_col_len);
|
||||
@@ -97,12 +96,7 @@ bool CGroupIni::get_item(OneGroupIni& group)
|
||||
|
||||
bool CGroupIni::del_item(const std::string& key)
|
||||
{
|
||||
ini_.Delete(key.c_str(), "MainNodes", true);
|
||||
ini_.Delete(key.c_str(), "RelativeNodes", true);
|
||||
ini_.Delete(key.c_str(), "ItemKey", true);
|
||||
ini_.Delete(key.c_str(), "Properties", true);
|
||||
ini_.Delete(key.c_str(), "MaxColLen", true);
|
||||
ini_.Delete(key.c_str(), "MaxBlankAdd", true);
|
||||
ini_.Delete(key.c_str(), nullptr);
|
||||
if (ini_.SaveFile(work_file_.c_str()) != SI_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user