summaryrefslogtreecommitdiffhomepage
path: root/editor/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-03 08:18:55 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-03 08:18:55 +0100
commit38b5c32b1037602068285dc3ad906cc7b94cdcb4 (patch)
treed97b974e1c6b9bb4c26ffbd7499f87c9545b2d8f /editor/camera.cpp
parentea09c317db4d243e064da095370545e43ff4c0c7 (diff)
kill compat/optional
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r--editor/camera.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp
index d7fc8695..2df3dd20 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -59,8 +59,8 @@ void app::reset_camera_offset()
void app::update_cursor_tile(const Optional<Vector2i>& pixel)
{
cursor.pixel = pixel;
- if (const auto [p, b] = pixel; b)
- cursor.tile = M->pixel_to_tile(Vector2d{p});
+ if (pixel)
+ cursor.tile = M->pixel_to_tile(Vector2d{*pixel});
else
cursor.tile = NullOpt;
}