| 2031 | } |
| 2032 | |
| 2033 | bool WaveClip::StrongInvariant() const |
| 2034 | { |
| 2035 | if (!CheckInvariants()) |
| 2036 | return false; |
| 2037 | const auto width = NChannels(); |
| 2038 | auto iter = mSequences.begin(), |
| 2039 | end = mSequences.end(); |
| 2040 | assert(iter != end); // because CheckInvariants is true |
| 2041 | auto &pFirst = *iter++; |
| 2042 | assert(pFirst); // likewise |
| 2043 | // All sequences must have the same lengths |
| 2044 | return all_of(iter, end, [&](decltype(pFirst) pSequence) { |
| 2045 | assert(pSequence); // likewise |
| 2046 | return pSequence->GetNumSamples() == pFirst->GetNumSamples(); |
| 2047 | }); |
| 2048 | } |
| 2049 | |
| 2050 | void WaveClip::AssertOrRepairStrongInvariant() |
| 2051 | { |
no test coverage detected