Skip to content

Commit

Permalink
Force lambda conversion to function pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
messmerd committed Nov 5, 2024
1 parent c922eb3 commit d810c38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/widgets/Fader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ void Fader::paintEvent(QPaintEvent* ev)
void Fader::paintLevels(QPaintEvent* ev, QPainter& painter, bool linear)
{
const auto mapper = linear
? [](float value) -> float { return value; }
: [](float value) -> float { return ampToDbfs(qMax(0.0001f, value)); };
? +[](float value) -> float { return value; }
: +[](float value) -> float { return ampToDbfs(qMax(0.0001f, value)); };

const float mappedMinPeak = mapper(m_fMinPeak);
const float mappedMaxPeak = mapper(m_fMaxPeak);
Expand Down

0 comments on commit d810c38

Please sign in to comment.