diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-21 15:26:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-21 15:26:03 +0000 |
commit | 6e138fa068197404a0ce8d80c06f9cbb283d225e (patch) | |
tree | ad2bff6835ea16ee366ea8c3d03add81f710095d /libs/ardour | |
parent | 4f16de5cfe3fcd73711f3f0e78ef7cd5ea2bb63b (diff) |
fix some warnings that come from a non-debug build, some of which are actually errors in handling return values from boost::signal emissions
git-svn-id: svn://localhost/ardour2/branches/3.0@7285 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audioengine.cc | 4 | ||||
-rw-r--r-- | libs/ardour/midi_playlist.cc | 2 | ||||
-rw-r--r-- | libs/ardour/playlist.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 9 |
4 files changed, 12 insertions, 5 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index d2cf8d12a4..903fbb227d 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -492,9 +492,9 @@ AudioEngine::process_callback (nframes_t nframes) if (_freewheeling) { /* emit the Freewheel signal and stop freewheeling in the event of trouble - * the indirection is to pick up the return value of the signal. */ - if (*Freewheel (nframes)) { + boost::optional<int> r = Freewheel (nframes); + if (r.get_value_or (0)) { jack_set_freewheel (_priv_jack, false); } diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index 89b5914753..152735de85 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -46,8 +46,10 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) : Playlist (session, node, DataType::MIDI, hidden) , _note_mode(Sustained) { +#ifndef NDEBUG const XMLProperty* prop = node.property("type"); assert(prop && DataType(prop->value()) == DataType::MIDI); +#endif in_set_state++; set_state (node, Stateful::loading_state_version); diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index bab4e358f9..0526d48b11 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -167,8 +167,10 @@ Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide , _type(type) { +#ifndef NDEBUG const XMLProperty* prop = node.property("type"); assert(!prop || DataType(prop->value()) == _type); +#endif init (hide); _name = "unnamed"; /* reset by set_state */ diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index b8409bfae9..a490bb10c9 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -852,7 +852,8 @@ Session::load_state (string snapshot_name) /* there is pending state from a crashed capture attempt */ - if (*AskAboutPendingState()) { + boost::optional<int> r = AskAboutPendingState(); + if (r.get_value_or (1)) { state_was_pending = true; } } @@ -1184,7 +1185,8 @@ Session::set_state (const XMLNode& node, int version) _nominal_frame_rate = atoi (prop->value()); if (_nominal_frame_rate != _current_frame_rate) { - if (*AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate)) { + boost::optional<int> r = AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate); + if (r.get_value_or (0)) { return -1; } } @@ -2447,7 +2449,8 @@ struct RegionCounter { int Session::ask_about_playlist_deletion (boost::shared_ptr<Playlist> p) { - return *AskAboutPlaylistDeletion (p); + boost::optional<int> r = AskAboutPlaylistDeletion (p); + return r.get_value_or (1); } int |