Replace body with do

This commit is contained in:
2018-01-31 12:05:06 +01:00
parent fd02c411e1
commit 048ddf21ff
22 changed files with 176 additions and 175 deletions

View File

@ -112,7 +112,7 @@ struct Integer
{
assert(allocator !is null);
}
body
do
{
this.allocator_ = allocator;
}
@ -873,7 +873,7 @@ struct Integer
{
assert(operand.length > 0, "Division by zero.");
}
body
do
{
divide(operand, this);
return this;
@ -885,7 +885,7 @@ struct Integer
{
assert(operand.length > 0, "Division by zero.");
}
body
do
{
divide(operand, null, this);
return this;
@ -1168,7 +1168,7 @@ struct Integer
{
assert(operand.length > 0, "Division by zero.");
}
body
do
{
mixin("return Integer(this, allocator) " ~ op ~ "= operand;");
}
@ -1287,7 +1287,7 @@ struct Integer
{
assert(divisor != 0, "Division by zero.");
}
body
do
{
if (compare(divisor) < 0)
{
@ -1472,7 +1472,7 @@ struct Integer
{
assert(array.length == length);
}
body
do
{
Array!ubyte array;

View File

@ -586,7 +586,7 @@ in
{
assert(z > 0, "Division by zero.");
}
body
do
{
G mask = G.max / 2 + 1;
H result;
@ -627,7 +627,7 @@ in
{
assert(z.length > 0, "Division by zero.");
}
body
do
{
size_t i;
auto tmp1 = Integer(x, x.allocator);

View File

@ -134,7 +134,7 @@ version (linux)
{
assert(length <= maxGather);
}
body
do
{
// int getrandom(void *buf, size_t buflen, unsigned int flags);
auto length = syscall(318, output.ptr, output.length, 0);
@ -198,7 +198,7 @@ class Entropy
assert(maxSources > 0 && maxSources <= ubyte.max);
assert(allocator !is null);
}
body
do
{
allocator.resize(sources, maxSources);
@ -234,7 +234,7 @@ class Entropy
{
assert(sourceCount_ <= sources.length);
}
body
do
{
sources[sourceCount_++] = source;
return this;
@ -251,7 +251,7 @@ class Entropy
{
assert(sourceCount_ > 0, "No entropy sources defined.");
}
body
do
{
bool haveStrong;
ushort done;