1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

CachedValue: Add const accessors

This commit is contained in:
reuk 2023-11-27 14:43:08 +00:00
parent b4aa74b3be
commit 3037041222
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -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.