refactor(Core/Misc): add braces and impove codestyle (#6402)

This commit is contained in:
Kargatum
2021-06-25 00:50:18 +07:00
committed by GitHub
parent 33c271cc7c
commit 3c24b511f2
72 changed files with 1486 additions and 401 deletions

View File

@@ -15,7 +15,9 @@ static RandomEngine engine;
static SFMTRand* GetRng()
{
if (!sfmtRand)
{
sfmtRand = std::make_unique<SFMTRand>();
}
return sfmtRand.get();
}
@@ -51,7 +53,7 @@ Milliseconds randtime(Milliseconds min, Milliseconds max)
{
long long diff = max.count() - min.count();
ASSERT(diff >= 0);
ASSERT(diff <= (uint32)-1);
ASSERT(diff <= (uint32) - 1);
return min + Milliseconds(urand(0, diff));
}