diff --git a/jlm/util/BijectiveMap.hpp b/jlm/util/BijectiveMap.hpp index 9d4455fad..371cb38eb 100644 --- a/jlm/util/BijectiveMap.hpp +++ b/jlm/util/BijectiveMap.hpp @@ -21,11 +21,11 @@ namespace jlm::util template class BijectiveMap { - using ForwardMapType = std::unordered_map; - using ReverseMapType = std::unordered_map; + using ForwardMapType = std::unordered_map; + using ReverseMapType = std::unordered_map; public: - using ItemType = std::pair; + using ItemType = std::pair; class ConstIterator final { @@ -177,7 +177,6 @@ class BijectiveMap { static_assert( std::is_base_of_v); - static_assert(std::is_base_of_v); size_t inserted = 0; while (begin != end) @@ -212,7 +211,7 @@ class BijectiveMap [[nodiscard]] bool HasKey(const K & key) const noexcept { - return ForwardMap_.find(key) != ForwardMap_.end(); + return ForwardMap_.count(key); } /** @@ -223,7 +222,7 @@ class BijectiveMap [[nodiscard]] bool HasValue(const V & value) const noexcept { - return ReverseMap_.find(value) != ReverseMap_.end(); + return ReverseMap_.count(value); } /**