2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

CRandom16: Make constructor explicit

Same behavior, minus the implicit conversions upon construction.
This commit is contained in:
Lioncash
2020-04-11 15:35:44 -04:00
parent 7e8ca5e808
commit 75d8988ee8
5 changed files with 6 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ class CRandom16 {
static CRandom16* g_randomNumber;
public:
CRandom16(s32 p = 99) : m_seed(p) {}
explicit CRandom16(s32 seed = 99) : m_seed(seed) {}
s32 Next() {
m_seed = (m_seed * 0x41c64e6d) + 0x00003039;
@@ -18,7 +18,7 @@ public:
s32 GetSeed() const { return m_seed; }
void SetSeed(s32 p) { m_seed = p; }
void SetSeed(s32 seed) { m_seed = seed; }
float Float() { return Next() * 0.000015259022f; }