mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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> cp2 {};
|
||||||
Point<float> cp3 { 1.0f, 1.0f };
|
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); };
|
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)
|
void setCubicBezierCurve (const CubicBezier& newBezierCurve)
|
||||||
{
|
{
|
||||||
if (std::exchange (bezierCurve, newBezierCurve) != newBezierCurve)
|
if (std::exchange (bezierCurve, newBezierCurve) == newBezierCurve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
updateText();
|
updateText();
|
||||||
|
|
@ -323,7 +323,7 @@ class CubicBezierGraphComponent final : public Component
|
||||||
public:
|
public:
|
||||||
void setCubicBezierCurve (const CubicBezier& newBezierCurve)
|
void setCubicBezierCurve (const CubicBezier& newBezierCurve)
|
||||||
{
|
{
|
||||||
if (std::exchange (bezierCurve, newBezierCurve) != newBezierCurve)
|
if (std::exchange (bezierCurve, newBezierCurve) == newBezierCurve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NullCheckedInvocation::invoke (onValueChange);
|
NullCheckedInvocation::invoke (onValueChange);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue