Ver Fonte

view: initialize all data members on construction

Michele Caini há 5 anos atrás
pai
commit
7e9a4c4b16
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      src/entt/entity/view.hpp

+ 4 - 2
src/entt/entity/view.hpp

@@ -681,7 +681,8 @@ public:
 
 
     /*! @brief Default constructor to use to create empty, invalid views. */
     /*! @brief Default constructor to use to create empty, invalid views. */
     basic_view() ENTT_NOEXCEPT
     basic_view() ENTT_NOEXCEPT
-        : pools{}
+        : pools{},
+          filter{}
     {}
     {}
 
 
     /**
     /**
@@ -689,7 +690,8 @@ public:
      * @param ref The storage for the type to iterate.
      * @param ref The storage for the type to iterate.
      */
      */
     basic_view(storage_type &ref) ENTT_NOEXCEPT
     basic_view(storage_type &ref) ENTT_NOEXCEPT
-        : pools{&ref}
+        : pools{&ref},
+          filter{}
     {}
     {}
 
 
     /**
     /**