Skip to content

Consider moving std::vector instead of copying the data #1891

@Caball009

Description

@Caball009

There are a couple of functions where std::vector<T> containers are copied instead of moved:
aiFollowExitProductionPath
aiFollowPath
AIStateMachine::setGoalPath

Maybe more could be found with queries such as: \(.*std::vector<.*>\s*\*

Beware that moving from const std::vector<T>* is meaningless, so this would require removing const from the function parameter at all call sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MinorSeverity: Minor < Major < Critical < BlockerPerformanceIs a performance concernRefactorEdits the code with insignificant behavior changes, is never user facing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions