mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-29 17:23:47 +00:00
[core] Use constexpr when possible
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace df
|
||||
{
|
||||
double const kDefault3dScale = 1.0;
|
||||
double constexpr kDefault3dScale = 1.0;
|
||||
|
||||
void Navigator::SetFromScreen(ScreenBase const & screen)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ void Navigator::SetFromScreen(ScreenBase const & screen, uint32_t tileSize, doub
|
||||
|
||||
if (!CheckMaxScale(tmp, tileSize, visualScale))
|
||||
{
|
||||
int const scale = scales::GetUpperStyleScale() - 1;
|
||||
int constexpr scale = scales::GetUpperStyleScale() - 1;
|
||||
m2::RectD newRect = df::GetRectForDrawScale(scale, screen.GetOrg());
|
||||
newRect.Scale(m_Screen.GetScale3d());
|
||||
CheckMinMaxVisibleScale(newRect, scale, m_Screen.GetScale3d());
|
||||
|
||||
Reference in New Issue
Block a user