This commit is contained in:
1 file changed
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user