Macro support for unpacking weak pointers.
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd committed 2020-03-26 21:55:00 +01:00
1 parent 7524c2d61c
commit eb84eb0588
1 file changed
+4 -1
+4 -1
View File
@@ -17,4 +17,7 @@
#define Assert(expr) ; #define Assert(expr) ;
#endif #endif
#define AssertNotNull(value) Assert(value != nullptr) #define AssertNotNull(value) Assert(value != nullptr)
#define UnpackWeakPtr(weakPtr, sharedPtr) \
Assert(!weakPtr.expired()); \
auto sharedPtr = weakPtr.lock();