Skip to content

Commit 166b5bf

Browse files
author
sourcehold
committed
improve style, remove sizeof
1 parent 5d12ea3 commit 166b5bf

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/OpenSHC/Random/RNG/nextRandomNumber1.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
namespace OpenSHC {
55
namespace Random {
66

7-
// FUNCTION: STRONGHOLDCRUSADER 0x0046a800
7+
// FUNCTION: STRONGHOLDCRUSADER 0x0046A800
88
void RNG::nextRandomNumber1()
99
{
1010
this->currentNumber1 = this->randomNumbers[this->index1];
1111
this->index1 += 1;
12-
if (sizeof(this->randomNumbers) / sizeof(this->randomNumbers[0]) <= this->index1) {
12+
if (20000 <= this->index1) {
1313
this->index1 = 0;
1414
}
1515
}

src/OpenSHC/Random/RNG/nextRandomNumber2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Random {
99
{
1010
this->currentNumber2 = this->randomNumbers[this->index2];
1111
this->index2 = this->index2 + 1;
12-
if (sizeof(this->randomNumbers) / sizeof(this->randomNumbers[0]) <= this->index2) {
12+
if (20000 <= this->index2) {
1313
this->index2 = 0;
1414
}
1515
return;

src/OpenSHC/Random/RNG/populateRNG1040.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Random {
1414
MACRO_CALL(OpenSHC::Global_Func::SetRNGSeed)(this->seed);
1515
this->index2 = 0;
1616
this->index1 = 0;
17-
for (int i = 0; i < sizeof(this->randomNumbers) / sizeof(this->randomNumbers[0]); i++) {
17+
for (int i = 0; i < 20000; i++) {
1818
this->randomNumbers[i] = MACRO_CALL(OpenSHC::OS_Func::_rand)();
1919
}
2020

src/OpenSHC/Random/RNG/setTimeBasedSeed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace OpenSHC {
77
namespace Random {
88

9-
// FUNCTION: STRONGHOLDCRUSADER 0x0046a740
9+
// FUNCTION: STRONGHOLDCRUSADER 0x0046A740
1010
void RNG::setTimeBasedSeed()
1111

1212
{

0 commit comments

Comments
 (0)