mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-03 15:58:23 +02:00
Change in JSON::Object::set(key,value) behavior in 1.6.1 #933
fix according to [suggestion](fee347ec6a (commitcomment-13196733)
)
This commit is contained in:
parent
50c84921fd
commit
32956fe044
@ -117,7 +117,7 @@ const std::string& Object::getKey(KeyPtrList::const_iterator& iter) const
|
|||||||
void Object::set(const std::string& key, const Dynamic::Var& value)
|
void Object::set(const std::string& key, const Dynamic::Var& value)
|
||||||
{
|
{
|
||||||
std::pair<ValueMap::iterator, bool> ret = _values.insert(ValueMap::value_type(key, value));
|
std::pair<ValueMap::iterator, bool> ret = _values.insert(ValueMap::value_type(key, value));
|
||||||
if (!ret.second) _values[key] = value;
|
if (!ret.second) ret.first->second = value;
|
||||||
if (_preserveInsOrder)
|
if (_preserveInsOrder)
|
||||||
{
|
{
|
||||||
KeyPtrList::iterator it = _keys.begin();
|
KeyPtrList::iterator it = _keys.begin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user