From 3037041222fc227b5d2de3f66b26237b6d175b16 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 27 Nov 2023 14:43:08 +0000 Subject: [PATCH] CachedValue: Add const accessors --- modules/juce_data_structures/values/juce_CachedValue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.