1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Get rid of NEW(), TRACKED_NEW, and ZERO().

This commit is contained in:
Darryl Pogue
2012-01-21 01:09:48 -08:00
committed by Adam Johnson
parent 30430d3024
commit 5013a978eb
423 changed files with 2500 additions and 2503 deletions

View File

@ -496,7 +496,7 @@ pfBoid::~pfBoid()
// delete this boid's token in the proximity database
delete fProximityToken;
plLoadCloneMsg* msg = TRACKED_NEW plLoadCloneMsg(fObjKey, fFlockerPtr->GetKey(), 0, false);
plLoadCloneMsg* msg = new plLoadCloneMsg(fObjKey, fFlockerPtr->GetKey(), 0, false);
msg->Send();
}
@ -790,7 +790,7 @@ fMaxForce(10.0f),
fMaxSpeed(5.0f),
fMinSpeed(4.0f)
{
fDatabase = TRACKED_NEW pfBasicProximityDatabase<pfVehicle*>();
fDatabase = new pfBasicProximityDatabase<pfVehicle*>();
}
pfFlock::~pfFlock()
@ -886,7 +886,7 @@ void pfFlock::Update(plSceneObject *goal, float deltaTime)
void pfFlock::AddBoid(pfObjectFlocker *flocker, plKey &key, hsPoint3 &pos)
{
pfBoid *newBoid = TRACKED_NEW pfBoid(*fDatabase, flocker, key, pos);
pfBoid *newBoid = new pfBoid(*fDatabase, flocker, key, pos);
newBoid->SetGoalWeight(fGoalWeight);
newBoid->SetWanderWeight(fRandomWeight);
@ -934,7 +934,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg)
plInitialAgeStateLoadedMsg* loadMsg = plInitialAgeStateLoadedMsg::ConvertNoRef(msg);
if (loadMsg)
{
plEnableMsg* pMsg = TRACKED_NEW plEnableMsg;
plEnableMsg* pMsg = new plEnableMsg;
pMsg->AddReceiver(fBoidKey);
pMsg->SetCmd(plEnableMsg::kDrawable);
pMsg->AddType(plEnableMsg::kDrawable);
@ -945,7 +945,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg)
hsPoint3 pos(fTarget->GetLocalToWorld().GetTranslate());
for (int i = 0; i < fNumBoids; i++)
{
plLoadCloneMsg* cloneMsg = TRACKED_NEW plLoadCloneMsg(fBoidKey->GetUoid(), GetKey(), 0);
plLoadCloneMsg* cloneMsg = new plLoadCloneMsg(fBoidKey->GetUoid(), GetKey(), 0);
plKey newKey = cloneMsg->GetCloneKey();
cloneMsg->Send();
@ -966,7 +966,7 @@ hsBool pfObjectFlocker::MsgReceive(plMessage* msg)
{
if (fRandomizeAnimationStart)
{
plAnimCmdMsg* pMsg = TRACKED_NEW plAnimCmdMsg;
plAnimCmdMsg* pMsg = new plAnimCmdMsg;
pMsg->SetSender(GetKey());
pMsg->SetBCastFlag(plMessage::kPropagateToModifiers | plMessage::kPropagateToChildren);
pMsg->AddReceiver( lcMsg->GetCloneKey() );

View File

@ -126,7 +126,7 @@ public:
virtual ~pfBasicProximityDatabase() {}
// allocate a token to represent a given client object in this database
tokenType *MakeToken(T parentObject) {return TRACKED_NEW tokenType(parentObject, fGroup);}
tokenType *MakeToken(T parentObject) {return new tokenType(parentObject, fGroup);}
// return the number of tokens currently in the database
int Size(void) {return fGroup.size();}

View File

@ -281,7 +281,7 @@ void plFollowMod::Read(hsStream* stream, hsResMgr* mgr)
fLeaderType = FollowLeaderType(stream->ReadByte());
fMode = stream->ReadByte();
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefLeader), plRefFlags::kActiveRef);
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefLeader), plRefFlags::kActiveRef);
// If active?
Activate();

View File

@ -155,14 +155,14 @@ void plLineFollowMod::Read(hsStream* stream, hsResMgr* mgr)
fPath = plAnimPath::ConvertNoRef(mgr->ReadCreatable(stream));
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParent), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefParent), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefObject), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefObject), plRefFlags::kPassiveRef);
int n = stream->ReadLE32();
while(n--)
{
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(stream, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef);
}
uint32_t f = stream->ReadLE32();
@ -616,12 +616,12 @@ void plLineFollowMod::RemoveTarget(plSceneObject* so)
void plLineFollowMod::AddStereizer(const plKey& key)
{
hsgResMgr::ResMgr()->SendRef(plKey(key), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef);
hsgResMgr::ResMgr()->SendRef(plKey(key), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefStereizer), plRefFlags::kPassiveRef);
}
void plLineFollowMod::RemoveStereizer(const plKey& key)
{
hsgResMgr::ResMgr()->SendRef(plKey(key), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefStereizer), plRefFlags::kPassiveRef);
hsgResMgr::ResMgr()->SendRef(plKey(key), new plGenRefMsg(GetKey(), plRefMsg::kOnRemove, 0, kRefStereizer), plRefFlags::kPassiveRef);
}
// derived version of this class for rail cameras

View File

@ -300,7 +300,7 @@ void plRandomCommandMod::IRetry(float secs)
double t = hsTimer::GetSysSeconds() + secs;
plAnimCmdMsg* msg = TRACKED_NEW plAnimCmdMsg(nil, GetKey(), &t);
plAnimCmdMsg* msg = new plAnimCmdMsg(nil, GetKey(), &t);
msg->SetCmd(plAnimCmdMsg::kContinue);
plgDispatch::MsgSend(msg);
}

View File

@ -86,7 +86,7 @@ void plViewFaceModifier::Read(hsStream* s, hsResMgr* mgr)
fOrigParentToLocal.Read(s);
if( HasFlag(kFaceObj) )
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefFaceObj), plRefFlags::kPassiveRef);
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefFaceObj), plRefFlags::kPassiveRef);
fOffset.Read(s);
@ -390,7 +390,7 @@ void plViewFaceModifier::IOnRemove(plGenRefMsg* refMsg)
void plViewFaceModifier::ISetObject(plKey soKey)
{
hsgResMgr::ResMgr()->SendRef(soKey, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFaceObj), plRefFlags::kPassiveRef);
hsgResMgr::ResMgr()->SendRef(soKey, new plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefFaceObj), plRefFlags::kPassiveRef);
}
void plViewFaceModifier::SetFollowMode(FollowMode m, plKey soKey)