/* 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;
after.set (port->type(), after.get (port->type()) - 1);
boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
- if (r.get_value_or (false)) {
+ if (r.value_or (false)) {
return -1;
}
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock());
connecting_legal = true;
boost::optional<int> r = ConnectingLegal ();
- return r.get_value_or (0);
+ return r.value_or (0);
}
void
if (flags != None) {
boost::optional<int> rv = PluginSetup (boost::dynamic_pointer_cast<Route>(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;
/* there is pending state from a crashed capture attempt */
boost::optional<int> r = AskAboutPendingState();
- if (r.get_value_or (1)) {
+ if (r.value_or (1)) {
state_was_pending = true;
}
}
assert (AudioEngine::instance()->running ());
if (_base_sample_rate != AudioEngine::instance()->sample_rate ()) {
boost::optional<int> r = AskAboutSampleRateMismatch (_base_sample_rate, _current_sample_rate);
- if (r.get_value_or (0)) {
+ if (r.value_or (0)) {
goto out;
}
}
}
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;
}
Session::ask_about_playlist_deletion (boost::shared_ptr<Playlist> p)
{
boost::optional<int> r = AskAboutPlaylistDeletion (p);
- return r.get_value_or (1);
+ return r.value_or (1);
}
void
{
// Prompt user for verification
boost::optional<bool> 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
boost::optional<bool> res = mtc_skipped ();
- if (res.get_value_or (false)) {
+ if (res.value_or (false)) {
/* no error, reset next expected frame */
if (rtmsg) {
boost::optional<int> res = edit (&inbyte, 1);
- if (res.get_value_or (1) >= 0 && !_offline) {
+ if (res.value_or (1) >= 0 && !_offline) {
realtime_msg (inbyte);
}
boost::optional<int> res = edit (msgbuf, msgindex);
- if (res.get_value_or (1) >= 0) {
+ if (res.value_or (1) >= 0) {
if (!possible_mmc (msgbuf, msgindex) || _mmc_forward) {
if (!possible_mtc (msgbuf, msgindex) || _mtc_forward) {
if (!_offline) {
edit_result = edit (msgbuf, msgindex);
- if (edit_result.get_value_or (1)) {
+ if (edit_result.value_or (1)) {
/* message not cancelled by an editor */