Removed a few unused lambda captures from SystemView.

This commit is contained in:
Leon Styhre 2022-12-11 17:02:21 +01:00
parent 030604ff98
commit e3be493d0d

View file

@ -375,7 +375,7 @@ void SystemView::onCursorChanged(const CursorState& state)
if (transitionStyle == "fade") { if (transitionStyle == "fade") {
float startFade {mFadeOpacity}; float startFade {mFadeOpacity};
anim = new LambdaAnimation( anim = new LambdaAnimation(
[this, startFade, startPos, endPos, posMax](float t) { [this, startFade, endPos](float t) {
if (t < 0.3f) if (t < 0.3f)
mFadeOpacity = mFadeOpacity =
glm::mix(0.0f, 1.0f, glm::clamp(t / 0.2f + startFade, 0.0f, 1.0f)); glm::mix(0.0f, 1.0f, glm::clamp(t / 0.2f + startFade, 0.0f, 1.0f));
@ -437,9 +437,8 @@ void SystemView::onCursorChanged(const CursorState& state)
else { else {
// Instant. // Instant.
updateGameCount(); updateGameCount();
anim = anim = new LambdaAnimation([this, endPos](float t) { mCamOffset = endPos; },
new LambdaAnimation([this, startPos, endPos, posMax](float t) { mCamOffset = endPos; }, static_cast<int>(animTime));
static_cast<int>(animTime));
} }
setAnimation(anim, 0, nullptr, false, 0); setAnimation(anim, 0, nullptr, false, 0);