[Scummvm-git-logs] scummvm master -> c49f338a0b272f860a0baedfba6f1bfd24cf4a37
lephilousophe
lephilousophe at users.noreply.github.com
Sun Feb 7 09:55:24 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c49f338a0b COMMON: Fix GCC deprecated-copy warning in SharedPtr
Commit: c49f338a0b272f860a0baedfba6f1bfd24cf4a37
https://github.com/scummvm/scummvm/commit/c49f338a0b272f860a0baedfba6f1bfd24cf4a37
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-02-07T10:53:38+01:00
Commit Message:
COMMON: Fix GCC deprecated-copy warning in SharedPtr
Changed paths:
common/ptr.h
diff --git a/common/ptr.h b/common/ptr.h
index 4c259efabb..415da83eaf 100644
--- a/common/ptr.h
+++ b/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; }
More information about the Scummvm-git-logs
mailing list