String view instead of string for get_name

This commit is contained in:
Pcornat 2026-01-10 15:31:33 +01:00
commit f2c8339c3f
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD

View file

@ -2,7 +2,7 @@
#define POC2DMODULAR_BASIC_DATA_HPP #define POC2DMODULAR_BASIC_DATA_HPP
#include <string> #include <string_view>
namespace data { namespace data {
class BasicData { class BasicData {
@ -19,7 +19,7 @@ namespace data {
virtual void window_size(int width, int height) = 0; virtual void window_size(int width, int height) = 0;
[[nodiscard]] virtual const std::string &get_name() const noexcept = 0; [[nodiscard]] virtual std::string_view get_name() const noexcept = 0;
}; };
} }