From e9c5549896d922ba85f39837aadc4d2ab6065a29 Mon Sep 17 00:00:00 2001 From: hanubeki Date: Tue, 14 Oct 2014 16:13:06 +0900 Subject: [PATCH] formatting operator<() --- src/NoteDisplay.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index 668b28fc45..d7606f5ed9 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -122,22 +122,35 @@ struct NoteSkinAndPath bool operator<( const NoteSkinAndPath &other ) const { int cmp = strcmp(sNoteSkin, other.sNoteSkin); + if( cmp < 0 ) + { return true; + } else if( cmp == 0 ) + { if( sPath < other.sPath ) + { return true; + } else if( sPath == other.sPath ) + { if ( pn < other.pn ) return true; else if ( pn == other.pn ) return gc < other.gc; else return false; + } else + { return false; + } + } else + { return false; + } } };