Skip to content

Commit

Permalink
manual allman brace fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed May 31, 2016
1 parent 1d34a12 commit ca098c5
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
3 changes: 2 additions & 1 deletion std/algorithm/iteration.d
Original file line number Diff line number Diff line change
Expand Up @@ -3683,7 +3683,8 @@ if (is(typeof(binaryFun!pred(r.front, s)) : bool)
int[][] w = [ [1, 2], [], [3], [4, 5], [] ];
static assert(isForwardRange!(typeof(splitter(a, 0))));

// foreach (x; splitter(a, 0)) {
// foreach (x; splitter(a, 0))
// {
// writeln("[", x, "]");
// }
assert(equal(splitter(a, 0), w));
Expand Down
4 changes: 3 additions & 1 deletion std/bigint.d
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,9 @@ public:
Warning: Casting to/from $(D const) or $(D immutable) may break type
system guarantees. Use with care.
*/
T opCast(T)() pure nothrow @nogc const if (is(Unqual!T == BigInt)) {
T opCast(T)() pure nothrow @nogc const
if (is(Unqual!T == BigInt))
{
return this;
}

Expand Down
4 changes: 3 additions & 1 deletion std/bitmanip.d
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ The example above creates a tagged reference to an Object in the struct A. This
as $(D taggedPointer), except the first argument which must be a class type instead of a pointer type.
*/

template taggedClassRef(T, string name, Ts...) if (is(T == class)) {
template taggedClassRef(T, string name, Ts...)
if (is(T == class))
{
enum taggedClassRef = createTaggedReference!(T, 8, name, Ts).result;
}

Expand Down
6 changes: 4 additions & 2 deletions std/csv.d
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,8 @@ public:
* auto records = CsvReader!(int,Malformed.ignore,string,char,string[])
* (str, ';', '^');
*
* foreach (record; records) {
* foreach (record; records)
* {
* assert(equal(record, ans));
* }
* -------
Expand All @@ -852,7 +853,8 @@ public:
* (str, ["high","low"], ';', '^');
*
* int[] ans = [76,22];
* foreach (record; records) {
* foreach (record; records)
* {
* assert(equal(record, ans));
* }
* -------
Expand Down
12 changes: 9 additions & 3 deletions std/range/interfaces.d
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ class OutputRangeObject(R, E...) : staticMap!(OutputRange, E) {


/**Returns the interface type that best matches $(D R).*/
template MostDerivedInputRange(R) if (isInputRange!(Unqual!R)) {
template MostDerivedInputRange(R)
if (isInputRange!(Unqual!R))
{
private alias E = ElementType!R;

static if (isRandomAccessRange!R)
Expand Down Expand Up @@ -332,7 +334,9 @@ template MostDerivedInputRange(R) if (isInputRange!(Unqual!R)) {
* all relevant range primitives in virtual functions. If $(D R) is already
* derived from the $(D InputRange) interface, aliases itself away.
*/
template InputRangeObject(R) if (isInputRange!(Unqual!R)) {
template InputRangeObject(R)
if (isInputRange!(Unqual!R))
{
static if (is(R : InputRange!(ElementType!R)))
{
alias InputRangeObject = R;
Expand Down Expand Up @@ -465,7 +469,9 @@ template InputRangeObject(R) if (isInputRange!(Unqual!R)) {
/**Convenience function for creating an $(D InputRangeObject) of the proper type.
* See $(LREF InputRange) for an example.
*/
InputRangeObject!R inputRangeObject(R)(R range) if (isInputRange!R) {
InputRangeObject!R inputRangeObject(R)(R range)
if (isInputRange!R)
{
static if (is(R : InputRange!(ElementType!R)))
{
return range;
Expand Down
4 changes: 2 additions & 2 deletions std/stdio.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Written in the D programming language.
// Written in the D programming language.

/**
Standard I/O functions that extend $(B core.stdc.stdio). $(B core.stdc.stdio)
Expand Down Expand Up @@ -2583,7 +2583,7 @@ $(D Range) that locks the file and allows fast writing to it.
}

// @@@BUG@@@ 2340
//void front(C)(C c) if (is(C : dchar)) {
//void front(C)(C c) if (is(C : dchar))
/// ditto
void put(C)(C c) @safe if (is(C : const(dchar)))
{
Expand Down
3 changes: 2 additions & 1 deletion std/string.d
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,8 @@ ptrdiff_t indexOfAny(Char,Char2)(const(Char)[] haystack, const(Char2)[] needles,
}

///
@safe pure unittest {
@safe pure unittest
{
import std.conv : to;

ptrdiff_t i = "helloWorld".indexOfAny("Wr");
Expand Down

0 comments on commit ca098c5

Please sign in to comment.