Fixes optional pointers.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f704a6c2f7
commit
9f064c1e25
|
@ -43,7 +43,7 @@ namespace ArbUt {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Return whether the pointer is null or not.
|
/// @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.
|
/// @brief Get the raw underlying pointer.
|
||||||
inline T* GetValue() const noexcept { return _raw; }
|
inline T* GetValue() const noexcept { return _raw; }
|
||||||
|
|
|
@ -33,6 +33,12 @@ namespace ArbUt {
|
||||||
return *this;
|
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.
|
/// @brief Assign operator with raw pointer.
|
||||||
inline OptionalUniquePtr<T>& operator=(T* rhs) {
|
inline OptionalUniquePtr<T>& operator=(T* rhs) {
|
||||||
if (_raw == rhs) {
|
if (_raw == rhs) {
|
||||||
|
|
Loading…
Reference in New Issue