Replace body with do
This commit is contained in:
@ -58,7 +58,7 @@ in
|
||||
assert(source.length == 0 || source.ptr !is null);
|
||||
assert(target.length == 0 || target.ptr !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
version (TanyaNative)
|
||||
{
|
||||
@ -126,7 +126,7 @@ in
|
||||
{
|
||||
assert(memory.length == 0 || memory.ptr !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
version (TanyaNative)
|
||||
{
|
||||
@ -203,7 +203,7 @@ in
|
||||
assert(source.length == 0 || source.ptr !is null);
|
||||
assert(target.length == 0 || target.ptr !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
version (TanyaNative)
|
||||
{
|
||||
@ -257,7 +257,7 @@ in
|
||||
assert(r1.length == 0 || r1.ptr !is null);
|
||||
assert(r2.length == 0 || r2.ptr !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
version (TanyaNative)
|
||||
{
|
||||
@ -321,7 +321,7 @@ in
|
||||
{
|
||||
assert(haystack.length == 0 || haystack.ptr !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto length = haystack.length;
|
||||
const size_t needleWord = size_t.max * needle;
|
||||
|
@ -45,7 +45,7 @@ mixin template DefaultAllocator()
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
this.allocator_ = allocator;
|
||||
}
|
||||
@ -63,7 +63,7 @@ mixin template DefaultAllocator()
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
if (allocator_ is null)
|
||||
{
|
||||
@ -78,7 +78,7 @@ mixin template DefaultAllocator()
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
if (allocator_ is null)
|
||||
{
|
||||
@ -114,7 +114,7 @@ out (allocator)
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
return (cast(GetPureInstance!Allocator) &getAllocatorInstance)();
|
||||
}
|
||||
@ -132,7 +132,7 @@ in
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
.allocator = allocator;
|
||||
}
|
||||
@ -403,7 +403,7 @@ in
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto mem = (() @trusted => allocator.allocate(stateSize!T))();
|
||||
if (mem is null)
|
||||
@ -442,7 +442,7 @@ in
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto mem = (() @trusted => allocator.allocate(stateSize!T))();
|
||||
if (mem is null)
|
||||
@ -484,7 +484,7 @@ in
|
||||
assert(allocator !is null);
|
||||
assert(n <= size_t.max / ElementType!T.sizeof);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto ret = allocator.resize!(ElementType!T)(null, n);
|
||||
ret.uninitializedFill(ElementType!T.init);
|
||||
|
@ -54,7 +54,7 @@ private final class RefCountedStore(T)
|
||||
{
|
||||
assert(this.counter > 0);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
mixin("return " ~ op ~ "counter;");
|
||||
}
|
||||
@ -139,7 +139,7 @@ struct RefCounted(T)
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
this.allocator_ = allocator;
|
||||
}
|
||||
@ -247,7 +247,7 @@ struct RefCounted(T)
|
||||
{
|
||||
assert(count > 0, "Attempted to access an uninitialized reference");
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
return this.storage.payload;
|
||||
}
|
||||
@ -501,7 +501,7 @@ in
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto rc = typeof(return)(allocator);
|
||||
|
||||
@ -546,7 +546,7 @@ in
|
||||
assert(allocator !is null);
|
||||
assert(size <= size_t.max / ElementType!T.sizeof);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
return RefCounted!T(allocator.make!T(size), allocator);
|
||||
}
|
||||
@ -664,7 +664,7 @@ struct Unique(T)
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
this.allocator_ = allocator;
|
||||
}
|
||||
@ -849,7 +849,7 @@ in
|
||||
{
|
||||
assert(allocator !is null);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto payload = allocator.make!(T, A)(args);
|
||||
return Unique!T(payload, allocator);
|
||||
@ -877,7 +877,7 @@ in
|
||||
assert(allocator !is null);
|
||||
assert(size <= size_t.max / ElementType!T.sizeof);
|
||||
}
|
||||
body
|
||||
do
|
||||
{
|
||||
auto payload = allocator.resize!(ElementType!T)(null, size);
|
||||
return Unique!T(payload, allocator);
|
||||
|
Reference in New Issue
Block a user