marked schema::attach methods as no-discard
This commit is contained in:
parent
405f158a88
commit
98af2bc6c4
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue