Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/simpleini.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brofield@users.noreply.github.com>2020-06-16 17:18:26 +0300
committerunknown <brofield@users.noreply.github.com>2020-06-16 17:18:26 +0300
commit3fea945de7264e7a6ae058211203a7f2b1a42b9d (patch)
tree3dd6c47deab24b62e7446486756c56a928b322a8 /SimpleIni.h
parentfe082fa81f4a55ddceb55056622136be616b3c6f (diff)
First stage of updating the project to have full test harness and incorporate some of the requested changes
Diffstat (limited to 'SimpleIni.h')
-rw-r--r--SimpleIni.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/SimpleIni.h b/SimpleIni.h
index 047c809..8d8f0f6 100644
--- a/SimpleIni.h
+++ b/SimpleIni.h
@@ -3,7 +3,7 @@
<table>
<tr><th>Library <td>SimpleIni
<tr><th>File <td>SimpleIni.h
- <tr><th>Author <td>Brodie Thiesfield [code at jellycan dot com]
+ <tr><th>Author <td>Brodie Thiesfield [brofield at gmail dot com]
<tr><th>Source <td>https://github.com/brofield/simpleini
<tr><th>Version <td>4.17
</table>
@@ -1929,6 +1929,7 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::AddEntry(
// check for existence of the key
TKeyVal & keyval = iSection->second;
typename TKeyVal::iterator iKey = keyval.find(a_pKey);
+ bInserted = iKey == keyval.end();
// remove all existing entries but save the load order and
// comment of the first entry
@@ -1975,8 +1976,8 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::AddEntry(
}
typename TKeyVal::value_type oEntry(oKey, static_cast<const SI_CHAR *>(NULL));
iKey = keyval.insert(oEntry);
- bInserted = true;
}
+
iKey->second = a_pValue;
return bInserted ? SI_INSERTED : SI_UPDATED;
}