Просмотр исходного кода

Fix MSVC 2017 warning C4458 (#43)

Fix MSVC 2017 warning C4458.
Nick Lange 8 лет назад
Родитель
Сommit
f2cbb5306b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/entt/entity/sparse_set.hpp

+ 2 - 2
src/entt/entity/sparse_set.hpp

@@ -614,11 +614,11 @@ public:
         auto to = other.end();
 
         pos_type pos = underlying_type::size() - 1;
-        const auto *direct = underlying_type::data();
+        const auto *local = underlying_type::data();
 
         while(pos > 0 && from != to) {
             if(underlying_type::has(*from)) {
-                if(*from != *(direct + pos)) {
+                if(*from != *(local + pos)) {
                     auto candidate = underlying_type::get(*from);
                     std::swap(instances[pos], instances[candidate]);
                     underlying_type::swap(pos, candidate);