summaryrefslogtreecommitdiffhomepage
path: root/editor/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-29 19:20:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-29 19:20:00 +0200
commit5ea810bbcd4567b38e3b8478eb5e7e3cab2e4720 (patch)
tree6b3b2b1f2cefc15f1592101b5bd4e832ea41c987 /editor/camera.cpp
parentc869ce688e7bde9fc12bd95e4de992ebf5f1362e (diff)
use constexpr
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r--editor/camera.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp
index bbb7d766..8929c97e 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -50,7 +50,8 @@ void app::do_camera(float dt)
void app::reset_camera_offset()
{
constexpr Vector3d size = TILE_MAX_DIM20d*dTILE_SIZE*-.5;
- M->shader().set_camera_offset(tile_shader::project(size));
+ constexpr auto projected = tile_shader::project(size);
+ M->shader().set_camera_offset(projected);
update_cursor_tile(cursor.pixel);
}