Просмотр исходного кода

Any now properly clears internal data when assigned a nullptr

BearishSun 9 лет назад
Родитель
Сommit
95b0288ee4
1 измененных файлов с 4 добавлено и 0 удалено
  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)
 		{ }