apply all-man braces in Phobos

// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
This commit is contained in:
Sebastian Wilzbach 2016-05-31 05:30:02 +02:00
parent f276dbc06b
commit 1d34a121e9
47 changed files with 1180 additions and 537 deletions

View file

@ -2396,7 +2396,8 @@ Params:
*/
void swapAt(R)(auto ref R r, size_t i1, size_t i2)
{
static if (is(typeof(&r.swapAt))) {
static if (is(typeof(&r.swapAt)))
{
r.swapAt(i1, i2);
}
else static if (is(typeof(&r[i1])))