Further fixes for optional scoped ptr.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c805b4eee8
commit
5274ba735c
|
@ -16,14 +16,14 @@ namespace ArbUt {
|
|||
/// @brief Initialise a ScopedPtr with a specific raw pointer.
|
||||
inline OptionalScopedPtr<T>(T* ptr) : _raw(ptr){};
|
||||
/// @brief Initialise a ScopedPtr from a copy.
|
||||
inline OptionalScopedPtr<T>(const ScopedPtr<T>& other) : _raw(other._raw){};
|
||||
inline OptionalScopedPtr<T>(const OptionalScopedPtr<T>& other) : _raw(other._raw){};
|
||||
/// @brief Initialise a ScopedPtr with a std unique_ptr.
|
||||
inline OptionalScopedPtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){};
|
||||
|
||||
~OptionalScopedPtr() noexcept { delete _raw; }
|
||||
|
||||
/// @brief Copy operator.
|
||||
inline OptionalScopedPtr<T>& operator=(const ScopedPtr<T>& rhs) {
|
||||
inline OptionalScopedPtr<T>& operator=(const OptionalScopedPtr<T>& rhs) {
|
||||
if (this == &rhs) {
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue