summaryrefslogtreecommitdiffhomepage
path: root/editor/editor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-01 19:50:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-01 19:50:50 +0100
commit940a4a8ea7bdf8d9315b818371a73ec939b0a69f (patch)
treec5d2e1dcd5d2564d72bba80630b819d7690e7f23 /editor/editor.cpp
parentb3f7ae5e7b353d2311700757377a70595af1fe08 (diff)
editor: add const
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r--editor/editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index 297cd5f8..1da0d42e 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -296,9 +296,9 @@ void editor::on_mouse_move(world& world, global_coords& pos, int mods)
if (auto* mode = current(); mode && _last_pos && _last_pos->btn != button::none)
{
auto& last = *_last_pos;
- Vector2i offset = pos - last.coord;
+ const Vector2i offset = pos - last.coord;
const snap_mode snap = get_snap_value(last.snap, mods);
- global_coords draw_coord = apply_snap(last.draw_coord + offset, last.draw_coord, snap);
+ const global_coords draw_coord = apply_snap(last.draw_coord + offset, last.draw_coord, snap);
if (pos != _last_pos->coord)
{
_last_pos = { pos, draw_coord, snap, last.btn };