Removed redundant NDEBUGs

This commit is contained in:
Jack Andersen 2017-12-22 19:35:55 -10:00
parent 3eba4cc1ac
commit 4c2a262478
3 changed files with 0 additions and 10 deletions

View File

@ -26,9 +26,7 @@ protected:
bool m_destroyed = false; bool m_destroyed = false;
void _destroy() void _destroy()
{ {
#ifndef NDEBUG
assert(!m_destroyed); assert(!m_destroyed);
#endif
m_destroyed = true; m_destroyed = true;
} }
Engine& m_engine; Engine& m_engine;
@ -42,10 +40,8 @@ public:
} }
~Entity() ~Entity()
{ {
#ifndef NDEBUG
/* Ensure proper destruction procedure followed */ /* Ensure proper destruction procedure followed */
assert(m_destroyed); assert(m_destroyed);
#endif
} }
Engine& getEngine() { return m_engine; } Engine& getEngine() { return m_engine; }

View File

@ -103,9 +103,7 @@ std::shared_ptr<Studio> Engine::_allocateStudio(bool mainOut)
std::list<std::shared_ptr<Voice>>::iterator Engine::_destroyVoice(std::list<std::shared_ptr<Voice>>::iterator it) std::list<std::shared_ptr<Voice>>::iterator Engine::_destroyVoice(std::list<std::shared_ptr<Voice>>::iterator it)
{ {
#ifndef NDEBUG
assert(this == &(*it)->getEngine()); assert(this == &(*it)->getEngine());
#endif
if ((*it)->m_destroyed) if ((*it)->m_destroyed)
return m_activeVoices.begin(); return m_activeVoices.begin();
(*it)->_destroy(); (*it)->_destroy();
@ -115,9 +113,7 @@ std::list<std::shared_ptr<Voice>>::iterator Engine::_destroyVoice(std::list<std:
std::list<std::shared_ptr<Sequencer>>::iterator std::list<std::shared_ptr<Sequencer>>::iterator
Engine::_destroySequencer(std::list<std::shared_ptr<Sequencer>>::iterator it) Engine::_destroySequencer(std::list<std::shared_ptr<Sequencer>>::iterator it)
{ {
#ifndef NDEBUG
assert(this == &(*it)->getEngine()); assert(this == &(*it)->getEngine());
#endif
if ((*it)->m_destroyed) if ((*it)->m_destroyed)
return m_activeSequencers.begin(); return m_activeSequencers.begin();
(*it)->_destroy(); (*it)->_destroy();

View File

@ -27,10 +27,8 @@ void Studio::addStudioSend(std::weak_ptr<Studio> studio, float dry, float auxA,
{ {
m_studiosOut.emplace_back(studio, dry, auxA, auxB); m_studiosOut.emplace_back(studio, dry, auxA, auxB);
#ifndef NDEBUG
/* Cyclic check */ /* Cyclic check */
assert(!_cyclicCheck(this)); assert(!_cyclicCheck(this));
#endif
} }
void Studio::resetOutputSampleRate(double sampleRate) void Studio::resetOutputSampleRate(double sampleRate)