diff options
author | David Robillard <d@drobilla.net> | 2022-12-13 01:19:10 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-14 18:04:27 -0500 |
commit | fa611574101cd657a0716aaf2028b5bc852d4a8a (patch) | |
tree | 7fce4411abeaa06a5eb33ebcb13c317743d4cada /include/ingen | |
parent | 4b56cdf7a925dafd5e4ac085874d2afe294ec456 (diff) | |
download | ingen-fa611574101cd657a0716aaf2028b5bc852d4a8a.tar.gz ingen-fa611574101cd657a0716aaf2028b5bc852d4a8a.tar.bz2 ingen-fa611574101cd657a0716aaf2028b5bc852d4a8a.zip |
Use std::optional
Diffstat (limited to 'include/ingen')
-rw-r--r-- | include/ingen/AtomReader.hpp | 9 | ||||
-rw-r--r-- | include/ingen/Parser.hpp | 33 |
2 files changed, 20 insertions, 22 deletions
diff --git a/include/ingen/AtomReader.hpp b/include/ingen/AtomReader.hpp index c83e7e4a..6e5d83fd 100644 --- a/include/ingen/AtomReader.hpp +++ b/include/ingen/AtomReader.hpp @@ -22,9 +22,8 @@ #include "ingen/ingen.h" #include "lv2/atom/atom.h" -#include <boost/optional/optional.hpp> - #include <cstdint> +#include <optional> namespace raul { class Path; @@ -58,9 +57,9 @@ public: private: void get_atom(const LV2_Atom* in, Atom& out); - boost::optional<URI> atom_to_uri(const LV2_Atom* atom); - boost::optional<raul::Path> atom_to_path(const LV2_Atom* atom); - Resource::Graph atom_to_context(const LV2_Atom* atom); + std::optional<URI> atom_to_uri(const LV2_Atom* atom); + std::optional<raul::Path> atom_to_path(const LV2_Atom* atom); + Resource::Graph atom_to_context(const LV2_Atom* atom); void get_props(const LV2_Atom_Object* obj, ingen::Properties& props); diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp index 485a5fa8..16ee4070 100644 --- a/include/ingen/Parser.hpp +++ b/include/ingen/Parser.hpp @@ -24,8 +24,7 @@ #include "raul/Path.hpp" // IWYU pragma: keep #include "raul/Symbol.hpp" // IWYU pragma: keep -#include <boost/optional/optional.hpp> - +#include <optional> #include <set> #include <string> #include <utility> @@ -80,21 +79,21 @@ public: * @return whether or not load was successful. */ virtual bool parse_file( - World& world, - Interface& target, - const FilePath& path, - const boost::optional<raul::Path>& parent = boost::optional<raul::Path>(), - const boost::optional<raul::Symbol>& symbol = boost::optional<raul::Symbol>(), - const boost::optional<Properties>& data = boost::optional<Properties>()); - - virtual boost::optional<URI> parse_string( - World& world, - Interface& target, - const std::string& str, - const URI& base_uri, - const boost::optional<raul::Path>& parent = boost::optional<raul::Path>(), - const boost::optional<raul::Symbol>& symbol = boost::optional<raul::Symbol>(), - const boost::optional<Properties>& data = boost::optional<Properties>()); + World& world, + Interface& target, + const FilePath& path, + const std::optional<raul::Path>& parent = std::optional<raul::Path>(), + const std::optional<raul::Symbol>& symbol = std::optional<raul::Symbol>(), + const std::optional<Properties>& data = std::optional<Properties>()); + + virtual std::optional<URI> parse_string( + World& world, + Interface& target, + const std::string& str, + const URI& base_uri, + const std::optional<raul::Path>& parent = std::optional<raul::Path>(), + const std::optional<raul::Symbol>& symbol = std::optional<raul::Symbol>(), + const std::optional<Properties>& data = std::optional<Properties>()); }; } // namespace ingen |