فهرست منبع

any: debug-only check to detect nasty bugs in the client code, if any

Michele Caini 4 سال پیش
والد
کامیت
26f85050c1
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/entt/core/any.hpp

+ 2 - 0
src/entt/core/any.hpp

@@ -351,6 +351,8 @@ public:
             vtable(operation::destroy, *this, nullptr);
         }
 
+        // unnecessary but it helps to detect nasty bugs
+        ENTT_ASSERT(!(instance = nullptr), "");
         info = &type_id<void>();
         vtable = nullptr;
         mode = policy::owner;