Explorar o código

workaround for an issue with VS (close #264)

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
038448865b
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/entt/core/algorithm.hpp

+ 3 - 3
src/entt/core/algorithm.hpp

@@ -61,11 +61,11 @@ struct insertion_sort {
                 auto pre = it++;
                 auto value = *pre;
 
-                while(pre-- != first && compare(value, *pre)) {
-                    *(pre+1) = *pre;
+                for(; pre != first && compare(value, *(pre-1)); --pre) {
+                    *pre = *(pre-1);
                 }
 
-                *(pre+1) = value;
+                *pre = value;
             }
         }
     }