diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 04:05:21 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 04:05:21 +0100 |
commit | 802c17175e595ddb3075465a1febc432262bcc3f (patch) | |
tree | 99d5ecabc8d2d62a09ab32976edfb9946ce81fcf /editor/editor.cpp | |
parent | f44e9d51013dbd153df3abc0c7b0ff1485ab65f2 (diff) |
use Corrade's Optional<T> instead of stl
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r-- | editor/editor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 67d9f344..e2690101 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -18,7 +18,7 @@ tile_editor* editor::current_tile_editor() noexcept void editor::on_release() { - _last_pos = std::nullopt; + _last_pos = NullOpt; } auto editor::get_snap_value(snap_mode snap, int mods) const -> snap_mode @@ -72,7 +72,7 @@ void editor::on_mouse_move(world& world, global_coords& pos, int mods) } else on_click_(world, draw_coord, last.btn); - _last_pos = { pos, draw_coord, snap, last.btn }; + _last_pos = { InPlaceInit, pos, draw_coord, snap, last.btn }; } pos = draw_coord; } @@ -97,7 +97,7 @@ void editor::on_click(world& world, global_coords pos, int mods, button b) { if (auto* mode = current_tile_editor(); mode != nullptr) { - _last_pos = { pos, pos, mode->check_snap(mods), b }; + _last_pos = { InPlaceInit, pos, pos, mode->check_snap(mods), b }; on_click_(world, pos, b); } } |