fix some non-debug compile warnings

git-svn-id: svn://localhost/ardour2/branches/3.0@7293 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-06-23 21:43:40 +00:00
parent 8db2e27faa
commit f188ffffc1
2 changed files with 6 additions and 0 deletions

View file

@ -106,8 +106,12 @@ class Source : public SessionObject
void inc_use_count () { g_atomic_int_inc (&_use_count); }
void dec_use_count () {
#ifndef NDEBUG
gint oldval = g_atomic_int_exchange_and_add (&_use_count, -1);
assert (oldval > 0);
#else
g_atomic_int_exchange_and_add (&_use_count, -1);
#endif
}
int use_count() const { return g_atomic_int_get (&_use_count); }

View file

@ -41,8 +41,10 @@ using namespace PBD;
AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden)
: Playlist (session, node, DataType::AUDIO, hidden)
{
#ifndef NDEBUG
const XMLProperty* prop = node.property("type");
assert(!prop || DataType(prop->value()) == DataType::AUDIO);
#endif
in_set_state++;
set_state (node, Stateful::loading_state_version);