diff options
Diffstat (limited to 'src/gui/LoadGraphWindow.cpp')
-rw-r--r-- | src/gui/LoadGraphWindow.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index 7a80a2bf..c9c18ae9 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -30,8 +30,8 @@ #include "ingen/client/GraphModel.hpp" #include "ingen/runtime_paths.hpp" #include "raul/Path.hpp" +#include "raul/Symbol.hpp" -#include <boost/optional/optional.hpp> #include <glibmm/fileutils.h> #include <glibmm/miscutils.h> #include <glibmm/propertyproxy.h> @@ -52,6 +52,7 @@ #include <list> #include <map> #include <memory> +#include <optional> #include <sstream> #include <string> #include <utility> @@ -187,8 +188,8 @@ LoadGraphWindow::ok_clicked() if (_import) { // If unset load_graph will load value - boost::optional<raul::Path> parent; - boost::optional<raul::Symbol> symbol; + std::optional<raul::Path> parent; + std::optional<raul::Symbol> symbol; if (!_graph->path().is_root()) { parent = _graph->path().parent(); symbol = _graph->symbol(); @@ -198,7 +199,7 @@ LoadGraphWindow::ok_clicked() true, FilePath(get_filename()), parent, symbol, _initial_data); } else { - std::list<Glib::ustring> uri_list = get_filenames(); + const std::list<Glib::ustring> uri_list = get_filenames(); for (const auto& u : uri_list) { // Cascade Atom& x = _initial_data.find(uris.ingen_canvasX)->second; @@ -244,16 +245,16 @@ LoadGraphWindow::symbol_from_filename(const Glib::ustring& filename) raul::Symbol LoadGraphWindow::avoid_symbol_clash(const raul::Symbol& symbol) { - unsigned offset = _app->store()->child_name_offset( + const unsigned offset = _app->store()->child_name_offset( _graph->path(), symbol); if (offset != 0) { std::stringstream ss; ss << symbol << "_" << offset; return raul::Symbol(ss.str()); - } else { - return symbol; } + + return symbol; } void |