Default the BorrowedPtr and OwnPtr to nullptr.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-30 17:41:08 +02:00
parent 6c5fe1bf93
commit 96b2bd61ab
3 changed files with 7 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ namespace Arbutils::Memory {
T* _ptr;
public:
inline BorrowedPtr() {};
inline BorrowedPtr() { _ptr = nullptr; };
inline explicit constexpr BorrowedPtr(T* ptr) noexcept : _ptr(ptr){};
inline constexpr T* GetUnsafe() noexcept { return _ptr; }