From d4ecfc7d8577e278bd4db3564fc418a780c5af79 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 21 Nov 2019 17:48:56 +0100 Subject: Use new boost::optional API get_value_or() has been deprecated since boost 1.56 --- libs/ardour/file_source.cc | 2 +- libs/ardour/io.cc | 4 ++-- libs/ardour/route.cc | 2 +- libs/ardour/session_state.cc | 8 ++++---- libs/ardour/tempo_map_importer.cc | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index 50d7360466..c5d9088ac5 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -296,7 +296,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist /* more than one match: ask the user */ - int which = FileSource::AmbiguousFileName (path, de_duped_hits).get_value_or (-1); + int which = FileSource::AmbiguousFileName (path, de_duped_hits).value_or (-1); if (which < 0) { goto out; diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index f185e073b0..b8e51ffd89 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -231,7 +231,7 @@ IO::remove_port (boost::shared_ptr port, void* src) after.set (port->type(), after.get (port->type()) - 1); boost::optional const r = PortCountChanging (after); /* EMIT SIGNAL */ - if (r.get_value_or (false)) { + if (r.value_or (false)) { return -1; } @@ -1398,7 +1398,7 @@ IO::enable_connecting () Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock()); connecting_legal = true; boost::optional r = ConnectingLegal (); - return r.get_value_or (0); + return r.value_or (0); } void diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 018035d4d3..b48b18b305 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -1076,7 +1076,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr if (flags != None) { boost::optional rv = PluginSetup (boost::dynamic_pointer_cast(shared_from_this ()), pi, flags); /* EMIT SIGNAL */ - int mode = rv.get_value_or (0); + int mode = rv.value_or (0); switch (mode & 3) { case 1: to_skip.push_back (*i); // don't add this one; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 51a057abf2..5222c85a8e 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -961,7 +961,7 @@ Session::load_state (string snapshot_name) /* there is pending state from a crashed capture attempt */ boost::optional r = AskAboutPendingState(); - if (r.get_value_or (1)) { + if (r.value_or (1)) { state_was_pending = true; } } @@ -1540,7 +1540,7 @@ Session::set_state (const XMLNode& node, int version) assert (AudioEngine::instance()->running ()); if (_base_sample_rate != AudioEngine::instance()->sample_rate ()) { boost::optional r = AskAboutSampleRateMismatch (_base_sample_rate, _current_sample_rate); - if (r.get_value_or (0)) { + if (r.value_or (0)) { goto out; } } @@ -2376,7 +2376,7 @@ retry: } if (!no_questions_about_missing_files) { - user_choice = MissingFile (this, err.path, err.type).get_value_or (-1); + user_choice = MissingFile (this, err.path, err.type).value_or (-1); } else { user_choice = -2; } @@ -3217,7 +3217,7 @@ int Session::ask_about_playlist_deletion (boost::shared_ptr p) { boost::optional r = AskAboutPlaylistDeletion (p); - return r.get_value_or (1); + return r.value_or (1); } void diff --git a/libs/ardour/tempo_map_importer.cc b/libs/ardour/tempo_map_importer.cc index cdb128df0e..cbb0662aaa 100644 --- a/libs/ardour/tempo_map_importer.cc +++ b/libs/ardour/tempo_map_importer.cc @@ -87,7 +87,7 @@ TempoMapImporter::_prepare_move () { // Prompt user for verification boost::optional replace = Prompt (_("This will replace the current tempo map!\nAre you sure you want to do this?")); - return replace.get_value_or (false); + return replace.value_or (false); } void -- cgit v1.2.3