mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-21 00:19:13 +00:00
CEntityInfo: std::move vector in constructor
Allows calling code to potentially avoid copies altogether by moving into the constructor.
This commit is contained in:
@@ -18,8 +18,8 @@ class CEntityInfo {
|
||||
TEditorId x14_editorId;
|
||||
|
||||
public:
|
||||
CEntityInfo(TAreaId aid, const std::vector<SConnection>& conns, TEditorId eid = kInvalidEditorId)
|
||||
: x0_areaId(aid), x4_conns(conns), x14_editorId(eid) {}
|
||||
CEntityInfo(TAreaId aid, std::vector<SConnection> conns, TEditorId eid = kInvalidEditorId)
|
||||
: x0_areaId(aid), x4_conns(std::move(conns)), x14_editorId(eid) {}
|
||||
TAreaId GetAreaId() const { return x0_areaId; }
|
||||
std::vector<SConnection> GetConnectionList() const { return x4_conns; }
|
||||
TEditorId GetEditorId() const { return x14_editorId; }
|
||||
|
||||
Reference in New Issue
Block a user