From f810d3d56a4e8674cb0d4a4e98137a900ea03c76 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 22 Jul 2019 14:44:04 +0100 Subject: [PATCH] Made dereferencing WeakRef behave more like the built-in pointer types --- modules/juce_core/memory/juce_WeakReference.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/juce_core/memory/juce_WeakReference.h b/modules/juce_core/memory/juce_WeakReference.h index 2f6199edbc..85f4d21d8d 100644 --- a/modules/juce_core/memory/juce_WeakReference.h +++ b/modules/juce_core/memory/juce_WeakReference.h @@ -105,10 +105,7 @@ public: operator ObjectType*() const noexcept { return get(); } /** Returns the object that this pointer refers to, or null if the object no longer exists. */ - ObjectType* operator->() noexcept { return get(); } - - /** Returns the object that this pointer refers to, or null if the object no longer exists. */ - const ObjectType* operator->() const noexcept { return get(); } + ObjectType* operator->() const noexcept { return get(); } /** This returns true if this reference has been pointing at an object, but that object has since been deleted.