From df75f5d2506f1e0b2ea68bd77341d78e42e15283 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Sat, 29 Nov 2025 13:59:47 -0500 Subject: [PATCH 1/2] refactor(perf): change aiDoCommand to take non-const pointer for move semantics --- GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h | 4 ++-- .../Code/GameEngine/Include/GameLogic/Module/AIUpdate.h | 2 +- .../Include/GameLogic/Module/AssaultTransportAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h | 2 +- .../Include/GameLogic/Module/DeployStyleAIUpdate.h | 2 +- .../Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/FlightDeckBehavior.h | 2 +- .../Include/GameLogic/Module/HackInternetAIUpdate.h | 2 +- .../Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h | 2 +- .../Include/GameLogic/Module/RailedTransportAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h | 2 +- GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp | 5 ++--- .../Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp | 2 +- .../GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 2 +- .../Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/RailedTransportAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp | 2 +- 24 files changed, 26 insertions(+), 27 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h index 710bdf2f0a..22500d4f43 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h @@ -449,7 +449,7 @@ class AICommandParmsStorage Path* m_path; public: - void store(const AICommandParms& parms); + void store(AICommandParms& parms); void reconstitute(AICommandParms& parms) const; void doXfer(Xfer *xfer); AICommandType getCommandType() const { return m_cmd; } @@ -466,7 +466,7 @@ class AICommandInterface { public: - virtual void aiDoCommand(const AICommandParms* parms) = 0; + virtual void aiDoCommand(AICommandParms* parms) = 0; inline void aiMoveToPosition( const Coord3D *pos, CommandSourceType cmdSource ) { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h index 3f5a9d4e9e..1c30299df2 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h @@ -353,7 +353,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface virtual void onObjectCreated(); virtual void doQuickExit( const std::vector* path ); ///< get out of this Object - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual const Coord3D *getGuardLocation( void ) const { return &m_locationToGuard; } virtual ObjectID getGuardObject( void ) const { return m_objectToGuard; } diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h index edcaf28bea..2ff29d3535 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h @@ -90,7 +90,7 @@ class AssaultTransportAIUpdate : public AIUpdateInterface, public AssaultTranspo AssaultTransportAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool isIdle() const; virtual UpdateSleepTime update(); virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; } diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h index 0b0279a046..13600fe30e 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h @@ -86,7 +86,7 @@ class ChinookAIUpdate : public SupplyTruckAIUpdate // virtual destructor prototype provided by memory pool declaration virtual UpdateSleepTime update(); - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool chooseLocomotorSet(LocomotorSetType wst); // this is present solely for some transports to override, so that they can land before // allowing people to exit... diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h index d79bccd2f7..f9a40759b0 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h @@ -98,7 +98,7 @@ class DeployStyleAIUpdate : public AIUpdateInterface DeployStyleAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool isIdle() const; virtual UpdateSleepTime update(); diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h index 2d5d4bd399..fd02b449ed 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h @@ -266,7 +266,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); protected: diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlightDeckBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlightDeckBehavior.h index 650166809a..b9d7314300 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlightDeckBehavior.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlightDeckBehavior.h @@ -148,7 +148,7 @@ class FlightDeckBehavior : public AIUpdateInterface, virtual Bool calcBestParkingAssignment( ObjectID id, Coord3D *pos, Int *oldIndex = NULL, Int *newIndex = NULL ); // AIUpdateInterface - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual const std::vector* getTaxiLocations( ObjectID id ) const; virtual const std::vector* getCreationLocations( ObjectID id ) const; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h index 6b049d7372..a308118922 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h @@ -195,7 +195,7 @@ class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInte HackInternetAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); Real getPackUnpackVariationFactor() const { return getHackInternetAIUpdateModuleData()->m_packUnpackVariationFactor; } UnsignedInt getUnpackTime() const; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h index 1840d30a4b..7fc7a5ea50 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h @@ -87,7 +87,7 @@ class JetAIUpdate : public AIUpdateInterface virtual JetAIUpdate* getJetAIUpdate() { return this; } virtual const JetAIUpdate* getJetAIUpdate() const { return this; } - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool chooseLocomotorSet(LocomotorSetType wst); virtual void setLocomotorGoalNone(); virtual Bool isIdle() const; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h index f937ba66b6..d0ddd74975 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h @@ -105,7 +105,7 @@ class POWTruckAIUpdate : public AIUpdateInterface, // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand( const AICommandParms *parms ); + virtual void aiDoCommand( AICommandParms *parms ); protected: diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h index 3f29b21677..ea1b6f15b3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h @@ -64,7 +64,7 @@ class RailedTransportAIUpdate : public AIUpdateInterface // virtual destructor prototype provided by memory pool declaration // AIUpdate interface methods - virtual void aiDoCommand( const AICommandParms *parms ); + virtual void aiDoCommand( AICommandParms *parms ); virtual UpdateSleepTime update( void ); protected: diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h index afc308ccf6..26865d52ab 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h @@ -174,7 +174,7 @@ class WorkerAIUpdate : public AIUpdateInterface, public DozerAIInterface, public // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); // Supply truck stuff virtual Int getNumberBoxes() const { return m_numberBoxes; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 6988747599..3f698b8df6 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -69,7 +69,6 @@ #include "GameLogic/Module/PhysicsUpdate.h" #include "GameLogic/Module/StealthUpdate.h" - static Bool cannotPossiblyAttackObject( State *thisState, void* userData ); //---------------------------------------------------------------------------------------------------------- @@ -90,7 +89,7 @@ AICommandParms::AICommandParms(AICommandType cmd, CommandSourceType cmdSource) : } //---------------------------------------------------------------------------------------------------------- -void AICommandParmsStorage::store(const AICommandParms& parms) +void AICommandParmsStorage::store(AICommandParms& parms) { m_cmd = parms.m_cmd; m_cmdSource = parms.m_cmdSource; @@ -98,7 +97,7 @@ void AICommandParmsStorage::store(const AICommandParms& parms) m_obj = parms.m_obj ? parms.m_obj->getID() : INVALID_ID; m_otherObj = parms.m_otherObj ? parms.m_otherObj->getID() : INVALID_ID; m_teamName = parms.m_team ? parms.m_team->getName() : AsciiString::TheEmptyString; - m_coords = parms.m_coords; + move_or_swap(m_coords, parms.m_coords); m_waypoint = parms.m_waypoint; m_polygon = parms.m_polygon; m_intValue = parms.m_intValue; /// misc usage diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp index 673cdc7441..8745252139 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp @@ -1390,7 +1390,7 @@ void FlightDeckBehavior::unreserveDoorForExit( ExitDoorType exitDoor ) } //------------------------------------------------------------------------------------------------- -void FlightDeckBehavior::aiDoCommand(const AICommandParms* parms) +void FlightDeckBehavior::aiDoCommand(AICommandParms* parms) { //Inspect the command and reset everything when necessary. if( parms->m_cmdSource != CMD_FROM_AI ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp index 2200bfd823..9c6b2cbd0a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp @@ -2615,7 +2615,7 @@ Bool AIUpdateInterface::isAllowedToRespondToAiCommands(const AICommandParms* par } //------------------------------------------------------------------------------------------------- -void AIUpdateInterface::aiDoCommand(const AICommandParms* parms) +void AIUpdateInterface::aiDoCommand(AICommandParms* parms) { // TheSuperHackers @info The AiCommandParms for m_obj, m_otherObj and m_team should be null tested before use. // These variables could relate to a deleted object when a pending command is reconstituted. diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp index 32ec0f80af..6562c1912c 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp @@ -80,7 +80,7 @@ AssaultTransportAIUpdate::~AssaultTransportAIUpdate( void ) } //------------------------------------------------------------------------------------------------- -void AssaultTransportAIUpdate::aiDoCommand(const AICommandParms* parms) +void AssaultTransportAIUpdate::aiDoCommand(AICommandParms* parms) { //Inspect the command and reset everything when necessary. if( parms->m_cmdSource != CMD_FROM_AI ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp index 87f5b42d9d..c431a03dfe 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp @@ -1256,7 +1256,7 @@ void ChinookAIUpdate::privateCombatDrop( Object* target, const Coord3D& pos, Com } //------------------------------------------------------------------------------------------------- -void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms) +void ChinookAIUpdate::aiDoCommand(AICommandParms* parms) { // this gets reset every time a command is issued. setAirfieldForHealing(INVALID_ID); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp index eaabef13d5..1f3676d416 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp @@ -70,7 +70,7 @@ Bool DeployStyleAIUpdate::isIdle() const } //------------------------------------------------------------------------------------------------- -void DeployStyleAIUpdate::aiDoCommand( const AICommandParms* parms ) +void DeployStyleAIUpdate::aiDoCommand( AICommandParms* parms ) { if (!isAllowedToRespondToAiCommands(parms)) return; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp index 1bebdbe441..e98b9d0f6e 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp @@ -2334,7 +2334,7 @@ Real DozerAIUpdate::getBoredRange( void ) const /////////////////////////////////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------------------------- -void DozerAIUpdate::aiDoCommand(const AICommandParms* parms) +void DozerAIUpdate::aiDoCommand(AICommandParms* parms) { // diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index b395edd50e..f706132376 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -121,7 +121,7 @@ UpdateSleepTime HackInternetAIUpdate::update( void ) } //------------------------------------------------------------------------------------------------- -void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) +void HackInternetAIUpdate::aiDoCommand(AICommandParms* parms) { if (!isAllowedToRespondToAiCommands(parms)) return; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index cac797bc77..301ed44f85 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -2530,7 +2530,7 @@ Bool JetAIUpdate::isParkedAt(const Object* obj) const } //------------------------------------------------------------------------------------------------- -void JetAIUpdate::aiDoCommand(const AICommandParms* parms) +void JetAIUpdate::aiDoCommand(AICommandParms* parms) { // call this from aiDoCommand as well as update, because this can // be called before update ever is... if the unit is placed on a map, diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp index 2939167495..8fccc52cac 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp @@ -111,7 +111,7 @@ void POWTruckAIUpdate::onDelete( void ) // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void POWTruckAIUpdate::aiDoCommand( const AICommandParms *parms ) +void POWTruckAIUpdate::aiDoCommand( AICommandParms *parms ) { if (!isAllowedToRespondToAiCommands(parms)) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp index 46de82863b..7224d54ef0 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp @@ -260,7 +260,7 @@ UpdateSleepTime RailedTransportAIUpdate::update( void ) // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void RailedTransportAIUpdate::aiDoCommand( const AICommandParms *parms ) +void RailedTransportAIUpdate::aiDoCommand( AICommandParms *parms ) { // if not allowed to respond to any command get out of here diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp index a3bdd0628a..f902bf8b64 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp @@ -950,7 +950,7 @@ const Coord3D* WorkerAIUpdate::getDockPoint( DozerTask task, DozerDockPoint poin // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void WorkerAIUpdate::aiDoCommand(const AICommandParms* parms) +void WorkerAIUpdate::aiDoCommand(AICommandParms* parms) { // From 2168e309d8b228d4529cb466d3def6250e01cb53 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Sat, 29 Nov 2025 14:02:33 -0500 Subject: [PATCH 2/2] refactor(perf): replicate aiDoCommand non-const changes to Generals --- Generals/Code/GameEngine/Include/GameLogic/AI.h | 4 ++-- Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h | 2 +- .../Include/GameLogic/Module/AssaultTransportAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h | 2 +- .../Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h | 2 +- .../Include/GameLogic/Module/HackInternetAIUpdate.h | 2 +- .../Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h | 2 +- .../Include/GameLogic/Module/RailedTransportAIUpdate.h | 2 +- .../Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h | 2 +- Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp | 2 +- .../GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp | 2 +- .../Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp | 2 +- .../Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/RailedTransportAIUpdate.cpp | 2 +- .../GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp | 2 +- GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Generals/Code/GameEngine/Include/GameLogic/AI.h b/Generals/Code/GameEngine/Include/GameLogic/AI.h index 502a2723cf..592577c6c7 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/AI.h +++ b/Generals/Code/GameEngine/Include/GameLogic/AI.h @@ -436,7 +436,7 @@ class AICommandParmsStorage Path* m_path; public: - void store(const AICommandParms& parms); + void store(AICommandParms& parms); void reconstitute(AICommandParms& parms) const; void doXfer(Xfer *xfer); }; @@ -452,7 +452,7 @@ class AICommandInterface { public: - virtual void aiDoCommand(const AICommandParms* parms) = 0; + virtual void aiDoCommand(AICommandParms* parms) = 0; inline void aiMoveToPosition( const Coord3D *pos, CommandSourceType cmdSource ) { diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h index 76fdff185c..82e3e003c2 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h @@ -340,7 +340,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface virtual void onObjectCreated(); virtual void doQuickExit( const std::vector* path ); ///< get out of this Object - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual const Coord3D *getGuardLocation( void ) const { return &m_locationToGuard; } virtual ObjectID getGuardObject( void ) const { return m_objectToGuard; } diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h index 9a7cba0a7d..1b4b3e210f 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h @@ -90,7 +90,7 @@ class AssaultTransportAIUpdate : public AIUpdateInterface, public AssaultTranspo AssaultTransportAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool isIdle() const; virtual UpdateSleepTime update(); virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; } diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h index fc8102420d..29e42b2490 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h @@ -84,7 +84,7 @@ class ChinookAIUpdate : public SupplyTruckAIUpdate // virtual destructor prototype provided by memory pool declaration virtual UpdateSleepTime update(); - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool chooseLocomotorSet(LocomotorSetType wst); // this is present solely for some transports to override, so that they can land before // allowing people to exit... diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h index 19223d5057..efe318558b 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h @@ -95,7 +95,7 @@ class DeployStyleAIUpdate : public AIUpdateInterface DeployStyleAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool isIdle() const; virtual UpdateSleepTime update(); diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h index 1488eecb0d..08ec4ed6b9 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h @@ -266,7 +266,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); protected: diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h index 7c161b47fa..b1647a52d1 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h @@ -192,7 +192,7 @@ class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInte HackInternetAIUpdate( Thing *thing, const ModuleData* moduleData ); // virtual destructor prototype provided by memory pool declaration - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); Real getPackUnpackVariationFactor() const { return getHackInternetAIUpdateModuleData()->m_packUnpackVariationFactor; } UnsignedInt getUnpackTime() const; diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h index c1b5facba1..51088e8520 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h @@ -84,7 +84,7 @@ class JetAIUpdate : public AIUpdateInterface virtual void onObjectCreated(); virtual void onDelete(); - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); virtual Bool chooseLocomotorSet(LocomotorSetType wst); virtual void setLocomotorGoalNone(); virtual Bool isIdle() const; diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h index b046386039..7058ab014e 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h @@ -105,7 +105,7 @@ class POWTruckAIUpdate : public AIUpdateInterface, // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand( const AICommandParms *parms ); + virtual void aiDoCommand( AICommandParms *parms ); protected: diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h index ac50fcfb50..ab499daf68 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h @@ -64,7 +64,7 @@ class RailedTransportAIUpdate : public AIUpdateInterface // virtual destructor prototype provided by memory pool declaration // AIUpdate interface methods - virtual void aiDoCommand( const AICommandParms *parms ); + virtual void aiDoCommand( AICommandParms *parms ); virtual UpdateSleepTime update( void ); protected: diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h index a124c77aff..956e6514b7 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/WorkerAIUpdate.h @@ -171,7 +171,7 @@ class WorkerAIUpdate : public AIUpdateInterface, public DozerAIInterface, public // the following methods must be overridden so that if a player issues a command the dozer // can exit the internal state machine and do whatever the player says // - virtual void aiDoCommand(const AICommandParms* parms); + virtual void aiDoCommand(AICommandParms* parms); // Supply truck stuff virtual Int getNumberBoxes() const { return m_numberBoxes; } diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 79913a7c7d..274c920d0f 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -87,7 +87,7 @@ AICommandParms::AICommandParms(AICommandType cmd, CommandSourceType cmdSource) : } //---------------------------------------------------------------------------------------------------------- -void AICommandParmsStorage::store(const AICommandParms& parms) +void AICommandParmsStorage::store(AICommandParms& parms) { m_cmd = parms.m_cmd; m_cmdSource = parms.m_cmdSource; diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp index e515ff54a4..803f2a7911 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp @@ -2554,7 +2554,7 @@ Bool AIUpdateInterface::isAllowedToRespondToAiCommands(const AICommandParms* par } //------------------------------------------------------------------------------------------------- -void AIUpdateInterface::aiDoCommand(const AICommandParms* parms) +void AIUpdateInterface::aiDoCommand(AICommandParms* parms) { // TheSuperHackers @info The AiCommandParms for m_obj, m_otherObj and m_team should be null tested before use. // These variables could relate to a deleted object when a pending command is reconstituted. diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp index 214cb16d0c..f6319fdb4d 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/AssaultTransportAIUpdate.cpp @@ -80,7 +80,7 @@ AssaultTransportAIUpdate::~AssaultTransportAIUpdate( void ) } //------------------------------------------------------------------------------------------------- -void AssaultTransportAIUpdate::aiDoCommand(const AICommandParms* parms) +void AssaultTransportAIUpdate::aiDoCommand(AICommandParms* parms) { //Inspect the command and reset everything when necessary. if( parms->m_cmdSource != CMD_FROM_AI ) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp index eff1686059..2425cfffd4 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp @@ -1121,7 +1121,7 @@ void ChinookAIUpdate::privateCombatDrop( Object* target, const Coord3D& pos, Com } //------------------------------------------------------------------------------------------------- -void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms) +void ChinookAIUpdate::aiDoCommand(AICommandParms* parms) { // this gets reset every time a command is issued. setAirfieldForHealing(INVALID_ID); diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp index 4d7749f530..8d9822b710 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp @@ -90,7 +90,7 @@ void DeployStyleAIUpdate::reset() } //------------------------------------------------------------------------------------------------- -void DeployStyleAIUpdate::aiDoCommand( const AICommandParms* parms ) +void DeployStyleAIUpdate::aiDoCommand( AICommandParms* parms ) { if (!isAllowedToRespondToAiCommands(parms)) return; diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp index c509c0baf6..4c20f7532a 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp @@ -2329,7 +2329,7 @@ Real DozerAIUpdate::getBoredRange( void ) const /////////////////////////////////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------------------------- -void DozerAIUpdate::aiDoCommand(const AICommandParms* parms) +void DozerAIUpdate::aiDoCommand(AICommandParms* parms) { // diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index 82c34f3859..08c7916a2c 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -121,7 +121,7 @@ UpdateSleepTime HackInternetAIUpdate::update( void ) } //------------------------------------------------------------------------------------------------- -void HackInternetAIUpdate::aiDoCommand(const AICommandParms* parms) +void HackInternetAIUpdate::aiDoCommand(AICommandParms* parms) { if (!isAllowedToRespondToAiCommands(parms)) return; diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index 29034934a4..34780e9e8b 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -2303,7 +2303,7 @@ Bool JetAIUpdate::isParkedAt(const Object* obj) const } //------------------------------------------------------------------------------------------------- -void JetAIUpdate::aiDoCommand(const AICommandParms* parms) +void JetAIUpdate::aiDoCommand(AICommandParms* parms) { // call this from aiDoCommand as well as update, because this can // be called before update ever is... if the unit is placed on a map, diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp index b809367e51..a8b00fa5f0 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/POWTruckAIUpdate.cpp @@ -111,7 +111,7 @@ void POWTruckAIUpdate::onDelete( void ) // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void POWTruckAIUpdate::aiDoCommand( const AICommandParms *parms ) +void POWTruckAIUpdate::aiDoCommand( AICommandParms *parms ) { if (!isAllowedToRespondToAiCommands(parms)) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp index f22256ff03..a08321e08b 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/RailedTransportAIUpdate.cpp @@ -260,7 +260,7 @@ UpdateSleepTime RailedTransportAIUpdate::update( void ) // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void RailedTransportAIUpdate::aiDoCommand( const AICommandParms *parms ) +void RailedTransportAIUpdate::aiDoCommand( AICommandParms *parms ) { // if not allowed to respond to any command get out of here diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp index 7b2dfd9eec..ff81592909 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp @@ -950,7 +950,7 @@ const Coord3D* WorkerAIUpdate::getDockPoint( DozerTask task, DozerDockPoint poin // ------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------- -void WorkerAIUpdate::aiDoCommand(const AICommandParms* parms) +void WorkerAIUpdate::aiDoCommand(AICommandParms* parms) { // diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 3f698b8df6..a79c26c747 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -97,7 +97,7 @@ void AICommandParmsStorage::store(AICommandParms& parms) m_obj = parms.m_obj ? parms.m_obj->getID() : INVALID_ID; m_otherObj = parms.m_otherObj ? parms.m_otherObj->getID() : INVALID_ID; m_teamName = parms.m_team ? parms.m_team->getName() : AsciiString::TheEmptyString; - move_or_swap(m_coords, parms.m_coords); + m_coords = parms.m_coords; m_waypoint = parms.m_waypoint; m_polygon = parms.m_polygon; m_intValue = parms.m_intValue; /// misc usage