mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
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:
parent
f276dbc06b
commit
1d34a121e9
47 changed files with 1180 additions and 537 deletions
|
@ -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])))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue