Revert "[clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers"

Commit message says "C++" where it should say "C#".

This reverts commit cb3f20d27c.
This commit is contained in:
Jonathan Coe 2020-03-10 09:30:34 +00:00
parent 5aa5c943f7
commit 5a101f3773
2 changed files with 0 additions and 12 deletions

View File

@ -1047,9 +1047,6 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
if (NextNonComment->is(TT_ArraySubscriptLSquare)) {
if (State.Stack.back().StartOfArraySubscripts != 0)
return State.Stack.back().StartOfArraySubscripts;
else if (Style.isCSharp()) // C# allows `["key"] = value` inside object
// initializers.
return State.Stack.back().Indent;
return ContinuationIndent;
}

View File

@ -549,15 +549,6 @@ Shape[] shapes = new[] { new Circle { Radius = 2.7281, Colour = Colours.Red },
private Transformer _transformer = new X.Y {
Filler = (Shape shape) => { return new Transform.Fill(shape, RED); },
Scaler = (Shape shape) => { return new Transform.Resize(shape, 0.1); },
};)",
Style);
// Dictionary initialisation.
verifyFormat(R"(//
var myDict = new Dictionary<string, string> {
["name"] = _donald,
["age"] = Convert.ToString(DateTime.Today.Year - 1934),
["type"] = _duck,
};)",
Style);
}