Browse Source

Any now properly clears internal data when assigned a nullptr

BearishSun 9 years ago
parent
commit
95b0288ee4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/BansheeUtility/Include/BsAny.h

+ 4 - 0
Source/BansheeUtility/Include/BsAny.h

@@ -52,6 +52,10 @@ namespace BansheeEngine
 			:mData(bs_new<Data<ValueType>>(value))
 		{ }
 
+		Any(nullptr_t)
+			:mData(nullptr)
+		{ }
+
 		Any(const Any& other) 
 			:mData(other.mData != nullptr ? other.mData->clone() : nullptr)
 		{ }