diff --git a/modules/juce_data_structures/values/juce_CachedValue.h b/modules/juce_data_structures/values/juce_CachedValue.h index cb3693d8de..cad87c66b1 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.h +++ b/modules/juce_data_structures/values/juce_CachedValue.h @@ -105,12 +105,12 @@ public: Type get() const noexcept { return cachedValue; } /** Dereference operator. Provides direct access to the property. */ - Type& operator*() noexcept { return cachedValue; } + const Type& operator*() const noexcept { return cachedValue; } /** Dereference operator. Provides direct access to members of the property if it is of object type. */ - Type* operator->() noexcept { return &cachedValue; } + const Type* operator->() const noexcept { return &cachedValue; } /** Returns true if the current value of the property (or the fallback value) is equal to other.