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:
parent
82cc6b7183
commit
e958e5a647
2 changed files with 20 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue