diff options
author | hcpp <hcpp@ydb.tech> | 2024-03-04 17:59:20 +0300 |
---|---|---|
committer | hcpp <hcpp@ydb.tech> | 2024-03-04 18:14:12 +0300 |
commit | 187ff575305eeb34f1917a964482b3724ec546f1 (patch) | |
tree | 16854ccdbffd8dadea641d01683ba42f7c93c730 /library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h | |
parent | d0dca30a5b0275bcdcc2c26f672558bc5113e479 (diff) | |
download | ydb-187ff575305eeb34f1917a964482b3724ec546f1.tar.gz |
disjoint_interval_tree has been fixed for the only one interval
591efff179d61582961dbd66ad865cec1fbf9886
Diffstat (limited to 'library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h')
-rw-r--r-- | library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h b/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h index 3f51c61277..f0c6644d4b 100644 --- a/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h +++ b/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h @@ -132,7 +132,7 @@ public: } TIterator completelyRemoveEnd = completelyRemoveBegin != Tree.end() ? Tree.lower_bound(end) : Tree.end(); - if (completelyRemoveEnd != Tree.end() && completelyRemoveEnd != Tree.begin() && completelyRemoveEnd->first != end) { + if (completelyRemoveEnd != Tree.begin() && (completelyRemoveEnd == Tree.end() || completelyRemoveEnd->first != end)) { TIterator containingEnd = completelyRemoveEnd; --containingEnd; if (containingEnd->second > end) { |