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;
void _destroy()
{
#ifndef NDEBUG
assert(!m_destroyed);
#endif
m_destroyed = true;
}
Engine& m_engine;
@ -42,10 +40,8 @@ public:
}
~Entity()
{
#ifndef NDEBUG
/* Ensure proper destruction procedure followed */
assert(m_destroyed);
#endif
}
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)
{
#ifndef NDEBUG
assert(this == &(*it)->getEngine());
#endif
if ((*it)->m_destroyed)
return m_activeVoices.begin();
(*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
Engine::_destroySequencer(std::list<std::shared_ptr<Sequencer>>::iterator it)
{
#ifndef NDEBUG
assert(this == &(*it)->getEngine());
#endif
if ((*it)->m_destroyed)
return m_activeSequencers.begin();
(*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);
#ifndef NDEBUG
/* Cyclic check */
assert(!_cyclicCheck(this));
#endif
}
void Studio::resetOutputSampleRate(double sampleRate)