1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-20 01:14:20 +00:00

Added comparison operators to MPEZone.

This commit is contained in:
Timur Doumler 2016-01-06 18:15:22 +00:00
parent 82cc6b7183
commit e958e5a647
2 changed files with 20 additions and 0 deletions

View file

@ -144,6 +144,20 @@ bool MPEZone::truncateToFit (MPEZone other) noexcept
return true;
}
//==========================================================================
bool MPEZone::operator== (const MPEZone& other) const noexcept
{
return masterChannel == other.masterChannel
&& numNoteChannels == other.numNoteChannels
&& perNotePitchbendRange == other.perNotePitchbendRange
&& masterPitchbendRange == other.masterPitchbendRange;
}
bool MPEZone::operator!= (const MPEZone& other) const noexcept
{
return ! operator== (other);
}
//==============================================================================
//==============================================================================
#if JUCE_UNIT_TESTS

View file

@ -120,6 +120,12 @@ struct JUCE_API MPEZone
*/
bool truncateToFit (MPEZone zoneToAvoid) noexcept;
/** @returns true if this zone is equal to the one passed in. */
bool operator== (const MPEZone& other) const noexcept;
/** @returns true if this zone is not equal to the one passed in. */
bool operator!= (const MPEZone& other) const noexcept;
private:
//==========================================================================
int masterChannel;