CObjectList: Make use of std::array where applicable

Same behavior, but with stronger typing.
This commit is contained in:
Lioncash 2020-03-17 22:36:44 -04:00
parent 6ddbd15cfc
commit 9e6f86cb16
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <array>
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/World/CEntity.hpp" #include "Runtime/World/CEntity.hpp"
@ -25,7 +27,7 @@ class CObjectList {
s16 next = -1; s16 next = -1;
s16 prev = -1; s16 prev = -1;
}; };
SObjectListEntry x0_list[1024]; // was an rstl::prereserved_vector std::array<SObjectListEntry, 1024> x0_list; // was an rstl::prereserved_vector
EGameObjectList x2004_listEnum; EGameObjectList x2004_listEnum;
s16 x2008_firstId = -1; s16 x2008_firstId = -1;
u16 x200a_count = 0; u16 x200a_count = 0;