diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-08 16:39:17 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:55 +0200 |
commit | 0e781f07bda4a73e89eb59b9765aa9f609647932 (patch) | |
tree | f1bdc081749245021427628e5ca291b49f4ff474 /src | |
parent | 9dd5936333082305b0b9680db2eac9abd128129b (diff) |
fix: change move cursor argument to non-const reference
Diffstat (limited to 'src')
-rw-r--r-- | src/game/input_configurator.cpp | 4 | ||||
-rw-r--r-- | src/game/input_configurator.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/game/input_configurator.cpp b/src/game/input_configurator.cpp index e8d2fe5..ea1ee75 100644 --- a/src/game/input_configurator.cpp +++ b/src/game/input_configurator.cpp @@ -8,9 +8,9 @@ void exit_success() exit(EXIT_SUCCESS); } -auto move_cursor(const Vector2 &direction, const CursorController &cursor_controller) +auto move_cursor(const Vector2 &direction, CursorController &cursor_controller) { - return [direction, cursor_controller]() + return [direction, &cursor_controller]() { cursor_controller.move(direction, 1U); }; diff --git a/src/game/input_configurator.hpp b/src/game/input_configurator.hpp index 3846d50..8e5b9bf 100644 --- a/src/game/input_configurator.hpp +++ b/src/game/input_configurator.hpp @@ -13,7 +13,7 @@ namespace InputActions { -auto move_cursor(const Vector2 &direction, const CursorController &cursor_controller); +auto move_cursor(const Vector2 &direction, CursorController &cursor_controller); void exit_success(); |