1
0
Эх сурвалжийг харах

added default constructor to handle

Michele Caini 7 жил өмнө
parent
commit
404afcdfd6

+ 3 - 1
src/entt/resource/handle.hpp

@@ -37,6 +37,8 @@ class resource_handle final {
     {}
     {}
 
 
 public:
 public:
+    /*! @brief Default constructor. */
+    resource_handle() ENTT_NOEXCEPT = default;
     /*! @brief Default copy constructor. */
     /*! @brief Default copy constructor. */
     resource_handle(const resource_handle &) ENTT_NOEXCEPT = default;
     resource_handle(const resource_handle &) ENTT_NOEXCEPT = default;
     /*! @brief Default move constructor. */
     /*! @brief Default move constructor. */
@@ -95,7 +97,7 @@ public:
      * @return A pointer to the managed resource or `nullptr` if the handle
      * @return A pointer to the managed resource or `nullptr` if the handle
      * contains no resource at all.
      * contains no resource at all.
      */
      */
-    inline const Resource * operator ->() const ENTT_NOEXCEPT {
+    inline const Resource * operator->() const ENTT_NOEXCEPT {
         assert(static_cast<bool>(resource));
         assert(static_cast<bool>(resource));
         return resource.get();
         return resource.get();
     }
     }