Created
March 3, 2014 17:33
-
-
Save d0k/9330150 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Format/ContinuationIndenter.h b/lib/Format/ContinuationIndenter.h | |
index 2b33f5b..1d88d05 100644 | |
--- a/lib/Format/ContinuationIndenter.h | |
+++ b/lib/Format/ContinuationIndenter.h | |
@@ -228,37 +228,22 @@ struct ParenState { | |
bool ObjCSelectorNameFound; | |
bool operator<(const ParenState &Other) const { | |
- if (Indent != Other.Indent) | |
- return Indent < Other.Indent; | |
- if (LastSpace != Other.LastSpace) | |
- return LastSpace < Other.LastSpace; | |
- if (FirstLessLess != Other.FirstLessLess) | |
- return FirstLessLess < Other.FirstLessLess; | |
- if (BreakBeforeClosingBrace != Other.BreakBeforeClosingBrace) | |
- return BreakBeforeClosingBrace; | |
- if (QuestionColumn != Other.QuestionColumn) | |
- return QuestionColumn < Other.QuestionColumn; | |
- if (AvoidBinPacking != Other.AvoidBinPacking) | |
- return AvoidBinPacking; | |
- if (BreakBeforeParameter != Other.BreakBeforeParameter) | |
- return BreakBeforeParameter; | |
- if (NoLineBreak != Other.NoLineBreak) | |
- return NoLineBreak; | |
- if (ColonPos != Other.ColonPos) | |
- return ColonPos < Other.ColonPos; | |
- if (StartOfFunctionCall != Other.StartOfFunctionCall) | |
- return StartOfFunctionCall < Other.StartOfFunctionCall; | |
- if (StartOfArraySubscripts != Other.StartOfArraySubscripts) | |
- return StartOfArraySubscripts < Other.StartOfArraySubscripts; | |
- if (CallContinuation != Other.CallContinuation) | |
- return CallContinuation < Other.CallContinuation; | |
- if (VariablePos != Other.VariablePos) | |
- return VariablePos < Other.VariablePos; | |
- if (ContainsLineBreak != Other.ContainsLineBreak) | |
- return ContainsLineBreak < Other.ContainsLineBreak; | |
- if (ContainsUnwrappedBuilder != Other.ContainsUnwrappedBuilder) | |
- return ContainsUnwrappedBuilder < Other.ContainsUnwrappedBuilder; | |
- return false; | |
+ return std::tie(this->Indent, this->LastSpace, this->FirstLessLess, | |
+ this->BreakBeforeClosingBrace; | |
+ this->QuestionColumn, this->AvoidBinPacking; | |
+ this->BreakBeforeParameter; this->NoLineBreak; | |
+ this->ColonPos, this->StartOfFunctionCall, | |
+ this->StartOfArraySubscripts, this->CallContinuation, | |
+ this->VariablePos, this->ContainsLineBreak, | |
+ this->ContainsUnwrappedBuilder) < | |
+ std::tie(Other.Indent, Other.LastSpace, Other.FirstLessLess, | |
+ Other.BreakBeforeClosingBrace; | |
+ Other.QuestionColumn, Other.AvoidBinPacking; | |
+ Other.BreakBeforeParameter; Other.NoLineBreak; | |
+ Other.ColonPos, Other.StartOfFunctionCall, | |
+ Other.StartOfArraySubscripts, Other.CallContinuation, | |
+ Other.VariablePos, Other.ContainsLineBreak, | |
+ Other.ContainsUnwrappedBuilder) | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment