Преглед изворни кода

meta_any: avoid risky fallthrough in the vtable (close #736)

Michele Caini пре 4 година
родитељ
комит
bb8bfaf262
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/entt/meta/meta.hpp

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

@@ -182,6 +182,7 @@ class meta_any {
                         static_cast<meta_any *>(to)->emplace<in_place_type>(adl_meta_pointer_like<Type>::dereference(any_cast<const Type &>(from)));
                     }
                 }
+                break;
             case operation::SEQ:
                 if constexpr(is_complete_v<meta_sequence_container_traits<Type>>) {
                     *static_cast<meta_sequence_container *>(to) = { std::in_place_type<Type>, std::move(const_cast<any &>(from)) };