2
0
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:
Lioncash
2019-09-15 16:04:13 -04:00
parent cc236dcaba
commit 0281029015
2 changed files with 11 additions and 11 deletions

View File

@@ -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; }