mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 14:34:27 +02:00
Reverted a (premature) optimization that can lead to out of bound write.
This commit is contained in:
@@ -549,7 +549,9 @@ class flat_tree
|
|||||||
pos = const_cast<const flat_tree&>(*this).priv_lower_bound(pos, ce, KeyOfValue()(val));
|
pos = const_cast<const flat_tree&>(*this).priv_lower_bound(pos, ce, KeyOfValue()(val));
|
||||||
//Check if already present
|
//Check if already present
|
||||||
if (pos != ce && !val_cmp(val, *pos)){
|
if (pos != ce && !val_cmp(val, *pos)){
|
||||||
skips[unique_burst-1] += static_cast<size_type>(unique_burst > 0);
|
if(unique_burst > 0){
|
||||||
|
++skips[unique_burst-1];
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user