container: handle conversion warnings

This commit is contained in:
Michele Caini
2025-02-07 15:26:48 +01:00
parent baad567dfa
commit ccb63bfd80
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ class dense_map {
[[nodiscard]] auto constrained_find(const Other &key, std::size_t bucket) const {
for(auto it = cbegin(bucket), last = cend(bucket); it != last; ++it) {
if(packed.second()(it->first, key)) {
return cbegin() + static_cast<typename iterator::difference_type>(it.index());
return cbegin() + static_cast<typename const_iterator::difference_type>(it.index());
}
}
+1 -1
View File
@@ -417,7 +417,7 @@ public:
*/
void erase(const size_type pos) {
ENTT_ASSERT(pos < size(), "Index out of bounds");
erase(begin() + static_cast<typename const_iterator::difference_type>(pos));
erase(begin() + static_cast<typename iterator::difference_type>(pos));
}
/**