mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
fix ordering behavior of insert to match doc
This commit is contained in:
@@ -140,19 +140,8 @@ public:
|
|||||||
/// Returns iterator pointing to the newly inserted value
|
/// Returns iterator pointing to the newly inserted value
|
||||||
{
|
{
|
||||||
Iterator it = find(val.first);
|
Iterator it = find(val.first);
|
||||||
|
while (it != _list.end() && isEqual(it->first, val.first)) ++it;
|
||||||
if (it == _list.end())
|
return _list.insert(it, 1, val);
|
||||||
{
|
|
||||||
_list.push_back(val);
|
|
||||||
it = _list.end();
|
|
||||||
--it;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_list.insert(it, 1, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return it;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void erase(Iterator it)
|
void erase(Iterator it)
|
||||||
|
|||||||
Reference in New Issue
Block a user