Skip to content

Commit 8cdffc8

Browse files
authored
Merge pull request #159 from kubo39/replace-body-with-do
Replace body with do merged-on-behalf-of: Petar Kirov <PetarKirov@users.noreply.github.com>
2 parents cc6fe5e + ec8ff7a commit 8cdffc8

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

src/containers/cyclicbuffer.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct CyclicBuffer(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange
4242
{
4343
assert(allocator !is null, "Allocator must not be null");
4444
}
45-
body
45+
do
4646
{
4747
this.allocator = allocator;
4848
}

src/containers/dynamicarray.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct DynamicArray(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange
5353
{
5454
assert(allocator !is null, "Allocator must not be null");
5555
}
56-
body
56+
do
5757
{
5858
this.allocator = allocator;
5959
}

src/containers/hashmap.d

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct HashMap(K, V, Allocator = Mallocator, alias hashFunction = generateHash!K
4242
{
4343
assert(allocator !is null, "Allocator must not be null");
4444
}
45-
body
45+
do
4646
{
4747
this.allocator = allocator;
4848
}
@@ -57,7 +57,7 @@ struct HashMap(K, V, Allocator = Mallocator, alias hashFunction = generateHash!K
5757
assert(allocator !is null, "Allocator must not be null");
5858
assert((bucketCount & (bucketCount - 1)) == 0, "bucketCount must be a power of two");
5959
}
60-
body
60+
do
6161
{
6262
this.allocator = allocator;
6363
initialize(bucketCount);
@@ -79,7 +79,7 @@ struct HashMap(K, V, Allocator = Mallocator, alias hashFunction = generateHash!K
7979
{
8080
assert((bucketCount & (bucketCount - 1)) == 0, "bucketCount must be a power of two");
8181
}
82-
body
82+
do
8383
{
8484
initialize(bucketCount);
8585
}
@@ -251,7 +251,7 @@ struct HashMap(K, V, Allocator = Mallocator, alias hashFunction = generateHash!K
251251
{
252252
assert (result.length == _length);
253253
}
254-
body
254+
do
255255
{
256256
import std.array : appender;
257257
auto app = appender!(K[])();
@@ -283,7 +283,7 @@ struct HashMap(K, V, Allocator = Mallocator, alias hashFunction = generateHash!K
283283
{
284284
assert (result.length == _length);
285285
}
286-
body
286+
do
287287
{
288288
import std.array : appender;
289289
auto app = appender!(ContainerElementType!(This, V)[])();

src/containers/hashset.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct HashSet(T, Allocator = Mallocator, alias hashFunction = generateHash!T,
4141
{
4242
assert(allocator !is null, "Allocator must not be null");
4343
}
44-
body
44+
do
4545
{
4646
this.allocator = allocator;
4747
}
@@ -56,7 +56,7 @@ struct HashSet(T, Allocator = Mallocator, alias hashFunction = generateHash!T,
5656
assert(allocator !is null, "Allocator must not be null");
5757
assert ((bucketCount & (bucketCount - 1)) == 0, "bucketCount must be a power of two");
5858
}
59-
body
59+
do
6060
{
6161
this.allocator = allocator;
6262
initialize(bucketCount);
@@ -73,7 +73,7 @@ struct HashSet(T, Allocator = Mallocator, alias hashFunction = generateHash!T,
7373
{
7474
assert ((bucketCount & (bucketCount - 1)) == 0, "bucketCount must be a power of two");
7575
}
76-
body
76+
do
7777
{
7878
initialize(bucketCount);
7979
}

src/containers/immutablehashset.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ImmutableHashSet(T, alias hashFunction)
3333
import std.array : array;
3434
assert (values.dup.sort().uniq().array().length == values.length);
3535
}
36-
body
36+
do
3737
{
3838
empty = values.length == 0;
3939
length = values.length;

src/containers/openhashset.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct OpenHashSet(T, Allocator = Mallocator,
4242
{
4343
assert(allocator !is null, "Allocator must not be null");
4444
}
45-
body
45+
do
4646
{
4747
this.allocator = allocator;
4848
}
@@ -59,7 +59,7 @@ struct OpenHashSet(T, Allocator = Mallocator,
5959
assert(allocator !is null, "Allocator must not be null");
6060
assert ((initialCapacity & initialCapacity - 1) == 0, "initialCapacity must be a power of 2");
6161
}
62-
body
62+
do
6363
{
6464
this.allocator = allocator;
6565
initialize(initialCapacity);
@@ -78,7 +78,7 @@ struct OpenHashSet(T, Allocator = Mallocator,
7878
{
7979
assert ((initialCapacity & initialCapacity - 1) == 0, "initialCapacity must be a power of 2");
8080
}
81-
body
81+
do
8282
{
8383
initialize(initialCapacity);
8484
}

src/containers/simdset.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ version (D_InlineAsm_X86_64) struct SimdSet(T, Allocator = Mallocator)
4141
{
4242
assert(allocator !is null, "Allocator must not be null");
4343
}
44-
body
44+
do
4545
{
4646
this.allocator = allocator;
4747
}

src/containers/slist.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct SList(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange!T)
3838
{
3939
assert(allocator !is null, "Allocator must not be null");
4040
}
41-
body
41+
do
4242
{
4343
this.allocator = allocator;
4444
}

src/containers/ttree.d

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct TTree(T, Allocator = Mallocator, bool allowDuplicates = false,
5656
{
5757
assert(allocator !is null, "Allocator must not be null");
5858
}
59-
body
59+
do
6060
{
6161
this.allocator = allocator;
6262
}
@@ -429,7 +429,7 @@ struct TTree(T, Allocator = Mallocator, bool allowDuplicates = false,
429429
{
430430
assert (!empty);
431431
}
432-
body
432+
do
433433
{
434434
index++;
435435
if (index >= nodeCapacity || current.isFree(index))
@@ -530,7 +530,7 @@ private:
530530
assert (result.left is null);
531531
assert (result.right is null);
532532
}
533-
body
533+
do
534534
{
535535
import core.memory : GC;
536536
import stdx.allocator : make;
@@ -552,7 +552,7 @@ private:
552552
{
553553
assert (n !is null);
554554
}
555-
body
555+
do
556556
{
557557
import stdx.allocator : dispose;
558558
import core.memory : GC;
@@ -656,7 +656,7 @@ private:
656656
static if (isPointer!T || is (T == class) || is (T == interface))
657657
assert (value !is null);
658658
}
659-
body
659+
do
660660
{
661661
import std.algorithm : sort;
662662
import std.range : assumeSorted;
@@ -834,7 +834,7 @@ private:
834834
{
835835
assert (!isEmpty());
836836
}
837-
body
837+
do
838838
{
839839
if (left is null && right is null)
840840
{
@@ -872,7 +872,7 @@ private:
872872
static if (isPointer!T || is (T == class) || is(T == interface))
873873
assert (result !is null);
874874
}
875-
body
875+
do
876876
{
877877
if (left is null && right is null)
878878
{

src/containers/unrolledlist.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct UnrolledList(T, Allocator = Mallocator,
4848
{
4949
assert(allocator !is null);
5050
}
51-
body
51+
do
5252
{
5353
this.allocator = allocator;
5454
}
@@ -254,7 +254,7 @@ struct UnrolledList(T, Allocator = Mallocator,
254254
assert (!empty());
255255
assert (_front.registry != 0);
256256
}
257-
body
257+
do
258258
{
259259
version (LDC_64)
260260
{
@@ -312,7 +312,7 @@ struct UnrolledList(T, Allocator = Mallocator,
312312
assert (!empty);
313313
assert (_front.registry != 0);
314314
}
315-
body
315+
do
316316
{
317317
version (LDC_64)
318318
{
@@ -339,7 +339,7 @@ struct UnrolledList(T, Allocator = Mallocator,
339339
assert (!empty);
340340
assert (!_back.empty);
341341
}
342-
body
342+
do
343343
{
344344
size_t i = nodeCapacity - 1;
345345
while (_back.isFree(i))
@@ -360,7 +360,7 @@ struct UnrolledList(T, Allocator = Mallocator,
360360
assert (!empty);
361361
assert (!_back.empty);
362362
}
363-
body
363+
do
364364
{
365365
size_t i = nodeCapacity - 1;
366366
while (_back.isFree(i))
@@ -544,7 +544,7 @@ private:
544544
assert (second !is null);
545545
assert (second is first.next);
546546
}
547-
body
547+
do
548548
{
549549
size_t i;
550550
ContainerStorageType!T[nodeCapacity] temp;

0 commit comments

Comments
 (0)