- changed TObjPtr to take a pointer as its template argument and not the class it points to.
This addresses the main issue with TObjPtr, namely that using it required pulling in the entire class hierarchy in basic headers like r_defs which polluted nearly every single source file in the project.
This commit is contained in:
parent
1cb89c6b37
commit
b8f7e305db
37 changed files with 124 additions and 140 deletions
|
|
@ -542,7 +542,7 @@ size_t DObject::StaticPointerSubstitution (DObject *old, DObject *notOld, bool s
|
|||
for (auto &sec : level.sectors)
|
||||
{
|
||||
#define SECTOR_CHECK(f,t) \
|
||||
if (sec.f.p == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); changed++; }
|
||||
if (sec.f.pp == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); changed++; }
|
||||
SECTOR_CHECK( SoundTarget, AActor );
|
||||
SECTOR_CHECK( SecActTarget, AActor );
|
||||
SECTOR_CHECK( floordata, DSectorEffect );
|
||||
|
|
@ -552,9 +552,9 @@ if (sec.f.p == static_cast<t *>(old)) { sec.f = static_cast<t *>(notOld); change
|
|||
}
|
||||
|
||||
// Go through bot stuff.
|
||||
if (bglobal.firstthing.p == (AActor *)old) bglobal.firstthing = (AActor *)notOld, ++changed;
|
||||
if (bglobal.body1.p == (AActor *)old) bglobal.body1 = (AActor *)notOld, ++changed;
|
||||
if (bglobal.body2.p == (AActor *)old) bglobal.body2 = (AActor *)notOld, ++changed;
|
||||
if (bglobal.firstthing.pp == (AActor *)old) bglobal.firstthing = (AActor *)notOld, ++changed;
|
||||
if (bglobal.body1.pp == (AActor *)old) bglobal.body1 = (AActor *)notOld, ++changed;
|
||||
if (bglobal.body2.pp == (AActor *)old) bglobal.body2 = (AActor *)notOld, ++changed;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue