Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
@@ -31,7 +31,7 @@ std::shared_ptr<Inventory> Inventories::createVirtual(size_t size) {
|
||||
});
|
||||
}
|
||||
|
||||
void Inventories::store(std::shared_ptr<Inventory> inv) {
|
||||
void Inventories::store(const std::shared_ptr<Inventory>& inv) {
|
||||
map[inv->getId()] = inv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user