CIni::InsertOrAssign const reference version implemented, fixed assinging issue .

This commit is contained in:
Zero Fanker 2024-08-05 13:57:34 -04:00
parent 28bfce25c9
commit 34a09e9aca

View file

@ -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