File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -406,11 +406,8 @@ struct Location {
406406 }
407407
408408 friend bool operator <(const Location &X, const Location &Y) {
409- if (X.File != Y.File )
410- return X.File < Y.File ;
411- if (X.Line != Y.Line )
412- return X.Line < Y.Line ;
413- return X.Column < Y.Column ;
409+ return std::tie (X.File , X.Line , X.Column ) <
410+ std::tie (Y.File , Y.Line , Y.Column );
414411 }
415412 friend bool operator >(const Location &X, const Location &Y) { return Y < X; }
416413 friend bool operator <=(const Location &X, const Location &Y) {
Original file line number Diff line number Diff line change @@ -494,19 +494,8 @@ class PPItemKey {
494494 return Column == Other.Column ;
495495 }
496496 bool operator <(const PPItemKey &Other) const {
497- if (Name < Other.Name )
498- return true ;
499- else if (Name > Other.Name )
500- return false ;
501- if (File < Other.File )
502- return true ;
503- else if (File > Other.File )
504- return false ;
505- if (Line < Other.Line )
506- return true ;
507- else if (Line > Other.Line )
508- return false ;
509- return Column < Other.Column ;
497+ return std::tie (Name, File, Line, Column) <
498+ std::tie (Other.Name , Other.File , Other.Line , Other.Column );
510499 }
511500 StringHandle Name;
512501 HeaderHandle File;
You can’t perform that action at this time.
0 commit comments