Fixes optional pointers.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-12-12 11:37:19 +01:00
1 parent f704a6c2f7
commit 9f064c1e25
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ namespace ArbUt {
}
/// @brief Return whether the pointer is null or not.
[[nodiscard]] inline bool HasValue() const noexcept { return _raw == nullptr; }
[[nodiscard]] inline bool HasValue() const noexcept { return _raw != nullptr; }
/// @brief Get the raw underlying pointer.
inline T* GetValue() const noexcept { return _raw; }
+6
View File
@@ -33,6 +33,12 @@ namespace ArbUt {
return *this;
}
/// @brief Return whether the pointer is null or not.
[[nodiscard]] inline bool HasValue() const noexcept { return _raw != nullptr; }
/// @brief Get the raw underlying pointer.
inline T* GetValue() const noexcept { return _raw; }
/// @brief Assign operator with raw pointer.
inline OptionalUniquePtr<T>& operator=(T* rhs) {
if (_raw == rhs) {