| @@ -26243,9 +26243,7 @@ int MidiMessageSequence::compareElements (const MidiMessageSequence::MidiEventHo | |||||
| const double diff = first->message.getTimeStamp() | const double diff = first->message.getTimeStamp() | ||||
| - second->message.getTimeStamp(); | - second->message.getTimeStamp(); | ||||
| return (diff == 0) ? 0 | |||||
| : ((diff > 0) ? 1 | |||||
| : -1); | |||||
| return (diff > 0) - (diff < 0); | |||||
| } | } | ||||
| void MidiMessageSequence::sort() | void MidiMessageSequence::sort() | ||||
| @@ -3088,7 +3088,7 @@ public: | |||||
| static int compareElements (const ElementType first, | static int compareElements (const ElementType first, | ||||
| const ElementType second) throw() | const ElementType second) throw() | ||||
| { | { | ||||
| return first - second; | |||||
| return (first > second) - (second < first); | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -3114,9 +3114,7 @@ public: | |||||
| static int compareElements (const ElementType first, | static int compareElements (const ElementType first, | ||||
| const ElementType second) throw() | const ElementType second) throw() | ||||
| { | { | ||||
| return (first < second) ? -1 | |||||
| : ((first == second) ? 0 | |||||
| : 1); | |||||
| return (first > second) - (second < first); | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -202,9 +202,7 @@ int MidiMessageSequence::compareElements (const MidiMessageSequence::MidiEventHo | |||||
| const double diff = first->message.getTimeStamp() | const double diff = first->message.getTimeStamp() | ||||
| - second->message.getTimeStamp(); | - second->message.getTimeStamp(); | ||||
| return (diff == 0) ? 0 | |||||
| : ((diff > 0) ? 1 | |||||
| : -1); | |||||
| return (diff > 0) - (diff < 0); | |||||
| } | } | ||||
| void MidiMessageSequence::sort() | void MidiMessageSequence::sort() | ||||
| @@ -284,7 +284,7 @@ public: | |||||
| static int compareElements (const ElementType first, | static int compareElements (const ElementType first, | ||||
| const ElementType second) throw() | const ElementType second) throw() | ||||
| { | { | ||||
| return first - second; | |||||
| return (first > second) - (second < first); | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -312,9 +312,7 @@ public: | |||||
| static int compareElements (const ElementType first, | static int compareElements (const ElementType first, | ||||
| const ElementType second) throw() | const ElementType second) throw() | ||||
| { | { | ||||
| return (first < second) ? -1 | |||||
| : ((first == second) ? 0 | |||||
| : 1); | |||||
| return (first > second) - (second < first); | |||||
| } | } | ||||
| }; | }; | ||||