From ccb63bfd806ee041c074d471bd86d78f2b3a2e79 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 7 Feb 2025 15:26:48 +0100 Subject: [PATCH] container: handle conversion warnings --- src/entt/container/dense_map.hpp | 2 +- src/entt/container/table.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/container/dense_map.hpp b/src/entt/container/dense_map.hpp index 9992a4bcc..12c05cd3f 100644 --- a/src/entt/container/dense_map.hpp +++ b/src/entt/container/dense_map.hpp @@ -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(it.index()); + return cbegin() + static_cast(it.index()); } } diff --git a/src/entt/container/table.hpp b/src/entt/container/table.hpp index 996d426b8..f7f64ce2e 100644 --- a/src/entt/container/table.hpp +++ b/src/entt/container/table.hpp @@ -417,7 +417,7 @@ public: */ void erase(const size_type pos) { ENTT_ASSERT(pos < size(), "Index out of bounds"); - erase(begin() + static_cast(pos)); + erase(begin() + static_cast(pos)); } /**