Browse Source

meta: cleanup

skypjack 4 months ago
parent
commit
48644e568f
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/entt/meta/meta.hpp

+ 2 - 6
src/entt/meta/meta.hpp

@@ -211,12 +211,8 @@ class meta_any {
     }
     }
 
 
     [[nodiscard]] const auto &fetch_node() const {
     [[nodiscard]] const auto &fetch_node() const {
-        if(node == nullptr) {
-            ENTT_ASSERT(vtable != nullptr, "Invalid vtable function");
-            vtable(internal::meta_traits::is_none, *ctx, this, nullptr);
-        }
-
-        return *node;
+        ENTT_ASSERT(vtable != nullptr, "Invalid vtable function");
+        return node ? *node : (vtable(internal::meta_traits::is_none, *ctx, this, nullptr), *node);
     }
     }
 
 
 public:
 public: