marked schema::attach methods as no-discard

This commit is contained in:
Sascha Kühl 2025-02-04 15:38:01 +01:00
parent 405f158a88
commit 98af2bc6c4
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ public:
explicit schema( const std::string& name = "");
template <typename Type>
utils::result<void, utils::error> attach(const std::string name, const std::string &parent = "") {
[[nodiscard]] utils::result<void, utils::error> attach(const std::string name, const std::string &parent = "") {
auto node = schema_node::make_node<Type>(*this, name);
auto result = attach_node(node, parent);
@ -36,7 +36,7 @@ public:
}
template <typename Type, typename ParentType>
utils::result<void, utils::error> attach(const std::string name) {
[[nodiscard]] utils::result<void, utils::error> attach(const std::string name) {
auto node = schema_node::make_node<Type>(*this, name);
auto result = attach_node(node, std::type_index(typeid(ParentType)));