Fix edge-case in identify 'end' upper-bound
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Just my luck, this was found immediately in the CI, right when I uploaded the project thinking I was done. Thankfully the fix is easy and (in hindsight) quite obvious.
This commit is contained in:
parent
3305b13936
commit
2004cd06cf
2 changed files with 7 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ public:
|
|||
if (insert_begin)
|
||||
it = underlying_.insert(it, {begin, val});
|
||||
// Get the proper upper-bound for `end`
|
||||
it = (it == underlying_.end()) ? it : std::next(it);
|
||||
it = (it == underlying_.end() || end < it->first) ? it : std::next(it);
|
||||
if (!(at_upper_bound(it) == end_val))
|
||||
underlying_.insert(it, {end, end_val});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue