From b9c50bc731c53d9e07116fb32901deecc78dd3a0 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 12 Dec 2024 09:16:38 +0100 Subject: [PATCH] test: [[nodiscard]] to make the linter happy --- test/entt/meta/meta_factory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/entt/meta/meta_factory.cpp b/test/entt/meta/meta_factory.cpp index 076e465f7..44147456e 100644 --- a/test/entt/meta/meta_factory.cpp +++ b/test/entt/meta/meta_factory.cpp @@ -21,7 +21,7 @@ struct clazz: base { clazz(int val) : value{val} {} - explicit operator int() const noexcept { + [[nodiscard]] explicit operator int() const noexcept { return get_int(); } @@ -33,15 +33,15 @@ struct clazz: base { value = val.value; } - int get_int() const noexcept { + [[nodiscard]] int get_int() const noexcept { return value; } - static std::string to_string(const clazz &instance) { + [[nodiscard]] static std::string to_string(const clazz &instance) { return std::to_string(instance.get_int()); } - static clazz from_string(const std::string &value) { + [[nodiscard]] static clazz from_string(const std::string &value) { return clazz{std::stoi(value)}; }