فهرست منبع

container: handle conversion warnings

Michele Caini 1 سال پیش
والد
کامیت
562d25c7ca
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 2 2
      src/entt/container/dense_map.hpp
  2. 2 2
      src/entt/container/dense_set.hpp
  3. 1 1
      src/entt/container/table.hpp

+ 2 - 2
src/entt/container/dense_map.hpp

@@ -277,7 +277,7 @@ class dense_map {
     [[nodiscard]] auto constrained_find(const Other &key, std::size_t bucket) {
         for(auto it = begin(bucket), last = end(bucket); it != last; ++it) {
             if(packed.second()(it->first, key)) {
-                return begin() + static_cast<typename iterator::difference_type>(it.index());
+                return begin() + static_cast<difference_type>(it.index());
             }
         }
 
@@ -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 const_iterator::difference_type>(it.index());
+                return cbegin() + static_cast<difference_type>(it.index());
             }
         }
 

+ 2 - 2
src/entt/container/dense_set.hpp

@@ -236,7 +236,7 @@ class dense_set {
     [[nodiscard]] auto constrained_find(const Other &value, std::size_t bucket) {
         for(auto it = begin(bucket), last = end(bucket); it != last; ++it) {
             if(packed.second()(*it, value)) {
-                return begin() + static_cast<typename iterator::difference_type>(it.index());
+                return begin() + static_cast<difference_type>(it.index());
             }
         }
 
@@ -247,7 +247,7 @@ class dense_set {
     [[nodiscard]] auto constrained_find(const Other &value, std::size_t bucket) const {
         for(auto it = cbegin(bucket), last = cend(bucket); it != last; ++it) {
             if(packed.second()(*it, value)) {
-                return cbegin() + static_cast<typename const_iterator::difference_type>(it.index());
+                return cbegin() + static_cast<difference_type>(it.index());
             }
         }
 

+ 1 - 1
src/entt/container/table.hpp

@@ -419,7 +419,7 @@ public:
      */
     void erase(const size_type pos) {
         ENTT_ASSERT(pos < size(), "Index out of bounds");
-        erase(begin() + static_cast<typename iterator::difference_type>(pos));
+        erase(begin() + static_cast<difference_type>(pos));
     }
 
     /**