Add [[nodiscard]] attribute where meaningful
Mainly functions with zero side effects.
Change-Id: Ie812f9ad67bfd54f13aaae35932a6d00ca80cbd6
diff --git a/src/interpreter.hpp b/src/interpreter.hpp
index 4b4056e..543fb2e 100644
--- a/src/interpreter.hpp
+++ b/src/interpreter.hpp
@@ -31,13 +31,13 @@
void operator()(const dump_& dump) const;
private:
- std::string buildTypeInfo(const std::string& path) const;
+ [[nodiscard]] std::string buildTypeInfo(const std::string& path) const;
template <typename PathType>
boost::variant<dataPath_, schemaPath_, module_> toCanonicalPath(const boost::optional<PathType>& path) const;
template <typename PathType>
- boost::variant<dataPath_, schemaPath_, module_> toCanonicalPath(const PathType& path) const;
+ [[nodiscard]] boost::variant<dataPath_, schemaPath_, module_> toCanonicalPath(const PathType& path) const;
Parser& m_parser;
DatastoreAccess& m_datastore;