41 #include "SynthNoteList.h"
44 void SynthNoteList::SanityCheck()
const
46 if (mState >= kNumberOfNoteStates) {
47 throw std::runtime_error(
"mState is bad");
52 throw std::runtime_error(
"mHead is NULL but not mTail");
56 throw std::runtime_error(
"mTail is NULL but not mHead");
60 throw std::runtime_error(
"mHead has a mPrev");
63 throw std::runtime_error(
"mTail has a mNext");
66 SynthNote *note = mHead;
69 if (note->mState != mState)
70 throw std::runtime_error(
"note in wrong state");
72 if (note->mNext->mPrev != note)
73 throw std::runtime_error(
"bad link 1");
76 throw std::runtime_error(
"note->mNext is nil, but mTail != note");
79 if (note->mPrev->mNext != note)
80 throw std::runtime_error(
"bad link 2");
83 throw std::runtime_error(
"note->mPrev is nil, but mHead != note");