diff --git a/src/include/interval-map/interval-map.hh b/src/include/interval-map/interval-map.hh index 1352b79..a514daf 100644 --- a/src/include/interval-map/interval-map.hh +++ b/src/include/interval-map/interval-map.hh @@ -18,12 +18,10 @@ public: auto const end_val = (*this)[end]; underlying_.erase(underlying_.lower_bound(begin), underlying_.upper_bound(end)); - if (!((*this)[begin] == val)) { + if (!((*this)[begin] == val)) underlying_.insert({begin, val}); - } - if (!((*this)[end] == end_val)) { + if (!((*this)[end] == end_val)) underlying_.insert({end, end_val}); - } } V const& operator[](K const& key) const {