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

trying to work around msvc limitations

Michele Caini 7 лет назад
Родитель
Сommit
b224dfdfac
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/entt/entity/prototype.hpp

+ 2 - 1
src/entt/entity/prototype.hpp

@@ -107,7 +107,8 @@ public:
         handlers.erase(std::remove_if(handlers.begin(), handlers.end(), [](const auto &handler) {
         handlers.erase(std::remove_if(handlers.begin(), handlers.end(), [](const auto &handler) {
             using accumulator_type = bool[];
             using accumulator_type = bool[];
             bool match = false;
             bool match = false;
-            accumulator_type accumulator = { (match = match || handler.type == registry_type::template type<Component>())... };
+            auto test = [&handler](bool match, component_type ctype) { return match || handler.type == ctype; };
+            accumulator_type accumulator = { (match = test(match, registry_type::template type<Component>()))... };
             (void)accumulator;
             (void)accumulator;
             return match;
             return match;
         }), handlers.end());
         }), handlers.end());