Browse Source

CachedValue: Suppress float equality warnings

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

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

@@ -116,13 +116,18 @@ public:
is equal to other.
*/
template <typename OtherType>
bool operator== (const OtherType& other) const { return cachedValue == other; }
bool operator== (const OtherType& other) const
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-equal")
return cachedValue == other;
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
}
/** Returns true if the current value of the property (or the fallback value)
is not equal to other.
*/
template <typename OtherType>
bool operator!= (const OtherType& other) const { return cachedValue != other; }
bool operator!= (const OtherType& other) const { return ! operator== (other); }
//==============================================================================
/** Returns the current property as a Value object. */


Loading…
Cancel
Save