diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp --- a/src/core/smallmap_type.hpp +++ b/src/core/smallmap_type.hpp @@ -115,7 +115,8 @@ struct SmallMap : SmallVector= this->Begin() && pair < this->End()); - SmallVector::Erase(pair); + auto distance = pair - std::vector::data(); + std::vector::erase(std::vector::begin() + distance); } /** @@ -126,11 +127,10 @@ struct SmallMap : SmallVectorFind(key); - if (pair == this->End()) - return false; + auto pair = std::find(this->begin(), this->end(), key); + if (pair == this->end()) return false; - SmallVector::Erase(pair); + std::vector::erase(pair); return true; }