summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--editor/tests-private.hpp4
-rw-r--r--editor/tests.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/editor/tests-private.hpp b/editor/tests-private.hpp
index 777daba5..01a15a33 100644
--- a/editor/tests-private.hpp
+++ b/editor/tests-private.hpp
@@ -23,14 +23,14 @@ using variant = std::variant<std::monostate, tests::path_test>;
namespace floormat {
-struct tests_data final : tests_data_
+struct tests_data final : tests_data_, tests::variant
{
fm_DECLARE_DELETED_COPY_ASSIGNMENT(tests_data);
tests_data();
~tests_data() noexcept override;
+ using tests::variant::operator=;
//tests::variant& operator*();
//tests::variant* operator->();
- tests::variant data{std::monostate{}};
};
} // namespace floormat
diff --git a/editor/tests.cpp b/editor/tests.cpp
index 52b52aa0..0e4bf6d3 100644
--- a/editor/tests.cpp
+++ b/editor/tests.cpp
@@ -39,7 +39,7 @@ bool app::tests_handle_mouse_click(const mouse_button_event& e)
[&](path_test& t) {
// todo
}
- }, var.data);
+ }, var);
return true;
}
@@ -52,7 +52,7 @@ bool app::tests_handle_mouse_click(const mouse_button_event& e)
ret = t.active;
t = {};
},
- }, var.data);
+ }, var);
return ret;
}
return false;
@@ -75,8 +75,8 @@ tests_data& app::tests()
void app::tests_reset_mode()
{
- if (!std::holds_alternative<std::monostate>(tests().data))
- tests().data = std::monostate{};
+ if (!std::holds_alternative<std::monostate>(tests()))
+ tests() = std::monostate{};
}
void app::draw_tests_pane(float main_menu_height)