From 48fc8faa1afb695db71c1b705e6c2c29305e39af Mon Sep 17 00:00:00 2001 From: Pcornat Date: Tue, 6 Jan 2026 23:11:21 +0100 Subject: [PATCH] basic_data.hpp is now a real interface. --- include/basic_data.hpp | 2 +- src/window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/basic_data.hpp b/include/basic_data.hpp index d9a54c9..502bc22 100644 --- a/include/basic_data.hpp +++ b/include/basic_data.hpp @@ -19,7 +19,7 @@ namespace data { virtual void window_size(int width, int height) = 0; - [[nodiscard]] virtual std::string get_name() const noexcept = 0; + [[nodiscard]] virtual const std::string &get_name() const noexcept = 0; }; } diff --git a/src/window.cpp b/src/window.cpp index 922fc97..1077515 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -78,7 +78,7 @@ namespace gui { } void Window::add_module(data::BasicData &module) { - modules.emplace(module.name, &module); + modules.emplace(module.get_name(), &module); } void Window::delete_module(const std::string &module) {