[core] Use constexpr when possible

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-10-24 08:36:38 +00:00
parent 936e05283c
commit 42f059f8f7
90 changed files with 258 additions and 259 deletions

View File

@@ -1246,11 +1246,11 @@ void UserEventStream::UpdateDoubleTapAndHold(Touch const & touch)
{
TEST_CALL(DOUBLE_TAP_AND_HOLD);
ASSERT_EQUAL(m_state, STATE_DOUBLE_TAP_HOLD, ());
float const kPowerModifier = 10.0f;
float constexpr kPowerModifier = 10.0f;
#if defined(OMIM_OS_IPHONE) || defined(OMIM_OS_MAC)
int const kPlatformScaleModifier = -1;
int constexpr kPlatformScaleModifier = -1;
#else
int const kPlatformScaleModifier = 1;
int constexpr kPlatformScaleModifier = 1;
#endif
double const scaleFactor = exp(kPowerModifier * (touch.m_location.y - m_startDoubleTapAndHold.y) /
GetCurrentScreen().PixelRectIn3d().SizeY() * kPlatformScaleModifier);