-
Notifications
You must be signed in to change notification settings - Fork 121
Use move for std::vector instead of copying in path functions #1895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
6684d6e
17353e6
0d9caa1
315d16f
e951e6c
2a5e8f8
fae8029
69c373c
63ff05f
e75fb44
87948f9
e97db76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2619,13 +2619,13 @@ void AIUpdateInterface::aiDoCommand(const AICommandParms* parms) | |
| privateFollowWaypointPathAsTeamExact(parms->m_waypoint, parms->m_cmdSource); | ||
| break; | ||
| case AICMD_FOLLOW_PATH: | ||
| privateFollowPath(&parms->m_coords, parms->m_obj, parms->m_cmdSource, FALSE); | ||
| privateFollowPath(&const_cast<AICommandParms*>(parms)->m_coords, parms->m_obj, parms->m_cmdSource, FALSE); | ||
|
||
| break; | ||
| case AICMD_FOLLOW_PATH_APPEND: | ||
| privateFollowPathAppend(&parms->m_pos, parms->m_cmdSource); | ||
| break; | ||
| case AICMD_FOLLOW_EXITPRODUCTION_PATH: | ||
| privateFollowPath(&parms->m_coords, parms->m_obj, parms->m_cmdSource, TRUE); | ||
| privateFollowPath(&const_cast<AICommandParms*>(parms)->m_coords, parms->m_obj, parms->m_cmdSource, TRUE); | ||
| break; | ||
| case AICMD_ATTACK_OBJECT: | ||
| privateAttackObject(parms->m_obj, parms->m_intValue, parms->m_cmdSource); | ||
|
|
@@ -3240,7 +3240,7 @@ void AIUpdateInterface::privateFollowPathAppend( const Coord3D *pos, CommandSour | |
| /** | ||
| * Follow the path defined by the given array of points | ||
| */ | ||
| void AIUpdateInterface::privateFollowPath( const std::vector<Coord3D>* path, Object *ignoreObject, CommandSourceType cmdSource, Bool exitProduction ) | ||
| void AIUpdateInterface::privateFollowPath( std::vector<Coord3D>* path, Object *ignoreObject, CommandSourceType cmdSource, Bool exitProduction ) | ||
| { | ||
| if (getObject()->isMobile() == FALSE) | ||
| return; | ||
|
|
@@ -3681,7 +3681,7 @@ void AIUpdateInterface::privateExit( Object *objectToExit, CommandSourceType cmd | |
| /** | ||
| * Get out of whatever it is inside of | ||
| */ | ||
| void AIUpdateInterface::doQuickExit( const std::vector<Coord3D>* path ) | ||
| void AIUpdateInterface::doQuickExit( std::vector<Coord3D>* path ) | ||
| { | ||
|
|
||
| Bool locked = getStateMachine()->isLocked(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.