Use TArrayView instead of TArray for ClearNativePointerFields
This commit is contained in:
parent
269689703d
commit
c284aa366d
3 changed files with 4 additions and 4 deletions
|
|
@ -417,7 +417,7 @@ size_t DObject::PropagateMark()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DObject::ClearNativePointerFields(const TArray<FName>& types)
|
||||
void DObject::ClearNativePointerFields(const TArrayView<FName>& types)
|
||||
{
|
||||
auto cls = GetClass();
|
||||
if (cls->VMType == nullptr)
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ public:
|
|||
inline int* IntArray(FName field);
|
||||
|
||||
// Make sure native data is wiped correctly since it has no read barriers.
|
||||
void ClearNativePointerFields(const TArray<FName>& types);
|
||||
void ClearNativePointerFields(const TArrayView<FName>& types);
|
||||
|
||||
// This is only needed for swapping out PlayerPawns and absolutely nothing else!
|
||||
virtual size_t PointerSubstitution (DObject *old, DObject *notOld, bool nullOnFail);
|
||||
|
|
|
|||
|
|
@ -300,9 +300,9 @@ void FLevelLocals::ClearLevelData(bool fullgc)
|
|||
|
||||
// Make sure map data gets cleared appropriately so any leftover Objects aren't pointing
|
||||
// towards anything invalid.
|
||||
TArray<FName> fieldTypes = { NAME_SectorPortal, NAME_LinePortal, NAME_Vertex, NAME_Side, NAME_Line, NAME_SecPlane, NAME_F3DFloor, NAME_Sector };
|
||||
FName fieldTypes[] = { NAME_SectorPortal, NAME_LinePortal, NAME_Vertex, NAME_Side, NAME_Line, NAME_SecPlane, NAME_F3DFloor, NAME_Sector };
|
||||
for (DObject* probe = GC::Root; probe != nullptr; probe = probe->ObjNext)
|
||||
probe->ClearNativePointerFields(fieldTypes);
|
||||
probe->ClearNativePointerFields({ fieldTypes, std::size(fieldTypes) });
|
||||
}
|
||||
|
||||
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue