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
This commit is contained in:
parent
4f16de5cfe
commit
6e138fa068
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user