mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
COMMON: Fix GCC deprecated-copy warning in SharedPtr
This commit is contained in:
parent
f6077152d1
commit
c49f338a0b
11
common/ptr.h
11
common/ptr.h
@ -305,6 +305,17 @@ public:
|
||||
SharedPtr(const SharedPtr<T2> &r) : BasePtr<T>(r) {
|
||||
}
|
||||
|
||||
SharedPtr &operator=(const SharedPtr &r) {
|
||||
BasePtr<T>::operator=(r);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T2>
|
||||
SharedPtr &operator=(const SharedPtr<T2> &r) {
|
||||
BasePtr<T>::operator=(r);
|
||||
return *this;
|
||||
}
|
||||
|
||||
T &operator*() const { assert(this->_pointer); return *this->_pointer; }
|
||||
T *operator->() const { assert(this->_pointer); return this->_pointer; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user