mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
reduce duplicative code (#16640)
This commit is contained in:
parent
25f26e2bdf
commit
2700b86566
3 changed files with 4 additions and 5 deletions
|
@ -186,8 +186,8 @@ unittest
|
|||
{
|
||||
bool overflow;
|
||||
immutable uint r = addu (uint.max - i, uint.max - i, overflow);
|
||||
assert (r == 2 * (uint.max - i));
|
||||
assert (overflow);
|
||||
assert(r == 2 * (uint.max - i));
|
||||
assert(overflow);
|
||||
}
|
||||
|
||||
bool overflow;
|
||||
|
|
|
@ -102,7 +102,7 @@ AAShell makeAA(K, V)(V[K] src) @trusted
|
|||
dim = dim * GROW_FAC;
|
||||
|
||||
// used during runtime.
|
||||
size_t delegate(scope const void *) nothrow hashFn = (scope const void* val) {
|
||||
typeof(Impl.hashFn) hashFn = (scope const void* val) {
|
||||
auto x = cast(K*)val;
|
||||
return hashOf(*x);
|
||||
};
|
||||
|
|
|
@ -219,13 +219,12 @@ do
|
|||
return overflowedError(optname, str);
|
||||
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
else // unexpected non-digit character
|
||||
{
|
||||
i = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue