mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
DemoRunner: Prevent infinite recursion in the AnimationEasing demo
This commit is contained in:
parent
f764026626
commit
fcaaf38c58
1 changed files with 4 additions and 4 deletions
|
|
@ -215,10 +215,10 @@ struct CubicBezier
|
|||
Point<float> cp2 {};
|
||||
Point<float> 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue