diff --git a/MissionEditor/IniFile.h b/MissionEditor/IniFile.h index d1d576e..18a26e5 100644 --- a/MissionEditor/IniFile.h +++ b/MissionEditor/IniFile.h @@ -193,10 +193,14 @@ public: auto const [pos, found] = LowerBound(key); if (!found) { InsertAt(pos, std::move(key), std::move(value)); + return; } // existed, assign value_pairs[pos].second = std::move(value); } + void InsertOrAssign(const CString& key, const CString& value) { + this->InsertOrAssign(CString(key), CString(value)); + } // ==================== Delete