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

meta: avoid invoking twice the same function

skypjack 4 месяцев назад
Родитель
Сommit
72127d699a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/entt/meta/node.hpp

+ 1 - 1
src/entt/meta/node.hpp

@@ -223,7 +223,7 @@ template<typename Func>
         for(auto &&curr: from.details->base) {
             if(const void *other = curr.cast(instance); curr.type == to) {
                 return func(other, curr.resolve(context));
-            } else if(auto elem = try_convert(context, curr.resolve(context), to, arithmetic_or_enum, curr.cast(instance), func); elem) {
+            } else if(auto elem = try_convert(context, curr.resolve(context), to, arithmetic_or_enum, other, func); elem) {
                 return elem;
             }
         }