Browse Source

CachedValue: Add const accessors

develop
reuk 2 years ago
parent
commit
3037041222
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_data_structures/values/juce_CachedValue.h

+ 2
- 2
modules/juce_data_structures/values/juce_CachedValue.h View File

@@ -105,12 +105,12 @@ public:
Type get() const noexcept { return cachedValue; } Type get() const noexcept { return cachedValue; }
/** Dereference operator. Provides direct access to the property. */ /** 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 /** Dereference operator. Provides direct access to members of the property
if it is of object type. 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) /** Returns true if the current value of the property (or the fallback value)
is equal to other. is equal to other.


Loading…
Cancel
Save