diff --git a/examples/GUI/AnimationEasingDemo.h b/examples/GUI/AnimationEasingDemo.h index f3efcb5564..f879fde2c1 100644 --- a/examples/GUI/AnimationEasingDemo.h +++ b/examples/GUI/AnimationEasingDemo.h @@ -215,10 +215,10 @@ struct CubicBezier Point cp2 {}; Point cp3 { 1.0f, 1.0f }; - bool operator!= (const CubicBezier& other) + bool operator== (const CubicBezier& other) { const auto tie = [](const CubicBezier& x) { return std::tie (x.cp0, x.cp1, x.cp2, x.cp3); }; - return tie (*this) != tie (other); + return tie (*this) == tie (other); } }; @@ -255,7 +255,7 @@ public: void setCubicBezierCurve (const CubicBezier& newBezierCurve) { - if (std::exchange (bezierCurve, newBezierCurve) != newBezierCurve) + if (std::exchange (bezierCurve, newBezierCurve) == newBezierCurve) return; updateText(); @@ -323,7 +323,7 @@ class CubicBezierGraphComponent final : public Component public: void setCubicBezierCurve (const CubicBezier& newBezierCurve) { - if (std::exchange (bezierCurve, newBezierCurve) != newBezierCurve) + if (std::exchange (bezierCurve, newBezierCurve) == newBezierCurve) return; NullCheckedInvocation::invoke (onValueChange);