diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 19:20:00 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 19:20:00 +0200 |
commit | 5ea810bbcd4567b38e3b8478eb5e7e3cab2e4720 (patch) | |
tree | 6b3b2b1f2cefc15f1592101b5bd4e832ea41c987 /editor/camera.cpp | |
parent | c869ce688e7bde9fc12bd95e4de992ebf5f1362e (diff) |
use constexpr
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r-- | editor/camera.cpp | 3 |
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); } |