From 98af2bc6c4d5501c8375dfde70e11ba17eb424c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=BChl?= Date: Tue, 4 Feb 2025 15:38:01 +0100 Subject: [PATCH] marked schema::attach methods as no-discard --- include/matador/object/schema.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/matador/object/schema.hpp b/include/matador/object/schema.hpp index 5878e8a..9e4780b 100644 --- a/include/matador/object/schema.hpp +++ b/include/matador/object/schema.hpp @@ -24,7 +24,7 @@ public: explicit schema( const std::string& name = ""); template - utils::result attach(const std::string name, const std::string &parent = "") { + [[nodiscard]] utils::result attach(const std::string name, const std::string &parent = "") { auto node = schema_node::make_node(*this, name); auto result = attach_node(node, parent); @@ -36,7 +36,7 @@ public: } template - utils::result attach(const std::string name) { + [[nodiscard]] utils::result attach(const std::string name) { auto node = schema_node::make_node(*this, name); auto result = attach_node(node, std::type_index(typeid(ParentType)));