CPVSVisOctree: Initialize in-class member variables where applicable

Provides a deterministic initial state for the default constructor.
This commit is contained in:
Lioncash 2020-03-07 04:59:04 -05:00
parent 4034e3b31f
commit 8d42eb4287
2 changed files with 11 additions and 7 deletions

View File

@ -14,9 +14,13 @@ CPVSVisOctree CPVSVisOctree::MakePVSVisOctree(const u8* data) {
}
CPVSVisOctree::CPVSVisOctree(const zeus::CAABox& aabb, u32 numObjects, u32 numLights, const u8* c)
: x0_aabb(aabb), x18_numObjects(numObjects), x1c_numLights(numLights), x20_bufferFlag(c != nullptr), x24_octreeData(c) {
x2c_searchAabb = x0_aabb;
x20_bufferFlag = 0;
: x0_aabb(aabb)
, x18_numObjects(numObjects)
, x1c_numLights(numLights)
, x20_bufferFlag(c != nullptr)
, x24_octreeData(c)
, x2c_searchAabb(x0_aabb) {
x20_bufferFlag = false;
}
u32 CPVSVisOctree::GetNumChildren(u8 byte) const {

View File

@ -10,10 +10,10 @@ namespace urde {
class CPVSVisOctree {
zeus::CAABox x0_aabb;
u32 x18_numObjects;
u32 x1c_numLights;
bool x20_bufferFlag;
const u8* x24_octreeData;
u32 x18_numObjects = 0;
u32 x1c_numLights = 0;
bool x20_bufferFlag = false;
const u8* x24_octreeData = nullptr;
zeus::CAABox x2c_searchAabb;
public: