Further fixes for optional scoped ptr.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-03-27 12:10:33 +01:00
parent c805b4eee8
commit 5274ba735c
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}