Parcourir la source

meta: minor changes

Michele Caini il y a 2 ans
Parent
commit
f65a21f88c
1 fichiers modifiés avec 2 ajouts et 5 suppressions
  1. 2 5
      src/entt/meta/meta.hpp

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

@@ -1619,11 +1619,8 @@ class meta_sequence_container::meta_iterator final {
 
     template<typename It>
     static void basic_vtable(const void *value, const std::ptrdiff_t offset, meta_any *other) {
-        if(const auto &it = *static_cast<const It *>(value); other) {
-            other->emplace<decltype(*it)>(*it);
-        } else {
-            std::advance(const_cast<It &>(it), offset);
-        }
+        const auto &it = *static_cast<const It *>(value);
+        other ? other->emplace<decltype(*it)>(*it) : std::advance(const_cast<It &>(it), offset);
     }
 
 public: