Skip to content

Commit ba67dff

Browse files
committed
refactor(perf): replicate aiDoCommand non-const changes to Generals
1 parent df75f5d commit ba67dff

22 files changed

+23
-23
lines changed

Generals/Code/GameEngine/Include/GameLogic/AI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ class AICommandParmsStorage
436436
Path* m_path;
437437

438438
public:
439-
void store(const AICommandParms& parms);
439+
void store(AICommandParms& parms);
440440
void reconstitute(AICommandParms& parms) const;
441441
void doXfer(Xfer *xfer);
442442
};
@@ -452,7 +452,7 @@ class AICommandInterface
452452
{
453453
public:
454454

455-
virtual void aiDoCommand(const AICommandParms* parms) = 0;
455+
virtual void aiDoCommand(AICommandParms* parms) = 0;
456456

457457
inline void aiMoveToPosition( const Coord3D *pos, CommandSourceType cmdSource )
458458
{

Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class AIUpdateInterface : public UpdateModule, public AICommandInterface
340340
virtual void onObjectCreated();
341341
virtual void doQuickExit( const std::vector<Coord3D>* path ); ///< get out of this Object
342342

343-
virtual void aiDoCommand(const AICommandParms* parms);
343+
virtual void aiDoCommand(AICommandParms* parms);
344344

345345
virtual const Coord3D *getGuardLocation( void ) const { return &m_locationToGuard; }
346346
virtual ObjectID getGuardObject( void ) const { return m_objectToGuard; }

Generals/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AssaultTransportAIUpdate : public AIUpdateInterface, public AssaultTranspo
9090
AssaultTransportAIUpdate( Thing *thing, const ModuleData* moduleData );
9191
// virtual destructor prototype provided by memory pool declaration
9292

93-
virtual void aiDoCommand(const AICommandParms* parms);
93+
virtual void aiDoCommand(AICommandParms* parms);
9494
virtual Bool isIdle() const;
9595
virtual UpdateSleepTime update();
9696
virtual AssaultTransportAIInterface* getAssaultTransportAIInterface() { return this; }

Generals/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ChinookAIUpdate : public SupplyTruckAIUpdate
8484
// virtual destructor prototype provided by memory pool declaration
8585

8686
virtual UpdateSleepTime update();
87-
virtual void aiDoCommand(const AICommandParms* parms);
87+
virtual void aiDoCommand(AICommandParms* parms);
8888
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
8989
// this is present solely for some transports to override, so that they can land before
9090
// allowing people to exit...

Generals/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class DeployStyleAIUpdate : public AIUpdateInterface
9595
DeployStyleAIUpdate( Thing *thing, const ModuleData* moduleData );
9696
// virtual destructor prototype provided by memory pool declaration
9797

98-
virtual void aiDoCommand(const AICommandParms* parms);
98+
virtual void aiDoCommand(AICommandParms* parms);
9999
virtual Bool isIdle() const;
100100
virtual UpdateSleepTime update();
101101

Generals/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface
266266
// the following methods must be overridden so that if a player issues a command the dozer
267267
// can exit the internal state machine and do whatever the player says
268268
//
269-
virtual void aiDoCommand(const AICommandParms* parms);
269+
virtual void aiDoCommand(AICommandParms* parms);
270270

271271

272272
protected:

Generals/Code/GameEngine/Include/GameLogic/Module/HackInternetAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class HackInternetAIUpdate : public AIUpdateInterface, public HackInternetAIInte
192192
HackInternetAIUpdate( Thing *thing, const ModuleData* moduleData );
193193
// virtual destructor prototype provided by memory pool declaration
194194

195-
virtual void aiDoCommand(const AICommandParms* parms);
195+
virtual void aiDoCommand(AICommandParms* parms);
196196

197197
Real getPackUnpackVariationFactor() const { return getHackInternetAIUpdateModuleData()->m_packUnpackVariationFactor; }
198198
UnsignedInt getUnpackTime() const;

Generals/Code/GameEngine/Include/GameLogic/Module/JetAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class JetAIUpdate : public AIUpdateInterface
8484
virtual void onObjectCreated();
8585
virtual void onDelete();
8686

87-
virtual void aiDoCommand(const AICommandParms* parms);
87+
virtual void aiDoCommand(AICommandParms* parms);
8888
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
8989
virtual void setLocomotorGoalNone();
9090
virtual Bool isIdle() const;

Generals/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class POWTruckAIUpdate : public AIUpdateInterface,
105105
// the following methods must be overridden so that if a player issues a command the dozer
106106
// can exit the internal state machine and do whatever the player says
107107
//
108-
virtual void aiDoCommand( const AICommandParms *parms );
108+
virtual void aiDoCommand( AICommandParms *parms );
109109

110110
protected:
111111

Generals/Code/GameEngine/Include/GameLogic/Module/RailedTransportAIUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RailedTransportAIUpdate : public AIUpdateInterface
6464
// virtual destructor prototype provided by memory pool declaration
6565

6666
// AIUpdate interface methods
67-
virtual void aiDoCommand( const AICommandParms *parms );
67+
virtual void aiDoCommand( AICommandParms *parms );
6868
virtual UpdateSleepTime update( void );
6969

7070
protected:

0 commit comments

Comments
 (0)