summaryrefslogtreecommitdiff
path: root/core/fxcrt/observable.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/observable.h')
-rw-r--r--core/fxcrt/observable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/observable.h b/core/fxcrt/observable.h
index e99dadfc8e..e118dc898b 100644
--- a/core/fxcrt/observable.h
+++ b/core/fxcrt/observable.h
@@ -25,13 +25,13 @@ class Observable {
// Simple case of a self-nulling pointer.
class ObservedPtr final : public Observer {
public:
- ObservedPtr() : m_pObservable(nullptr) {}
+ ObservedPtr() = default;
explicit ObservedPtr(T* pObservable) : m_pObservable(pObservable) {
if (m_pObservable)
m_pObservable->AddObserver(this);
}
ObservedPtr(const ObservedPtr& that) : ObservedPtr(that.Get()) {}
- ~ObservedPtr() {
+ ~ObservedPtr() override {
if (m_pObservable)
m_pObservable->RemoveObserver(this);
}
@@ -60,7 +60,7 @@ class Observable {
T* operator->() const { return m_pObservable; }
private:
- T* m_pObservable;
+ T* m_pObservable = nullptr;
};
Observable() = default;