mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
refactor
This commit is contained in:
parent
167388aefb
commit
ef28a368cb
12 changed files with 54 additions and 51 deletions
|
|
@ -26,7 +26,9 @@ std::shared_ptr<Inventory> Inventories::createVirtual(size_t size) {
|
|||
|
||||
auto inv = std::make_shared<Inventory>(id, size);
|
||||
store(inv);
|
||||
return inv;
|
||||
return std::shared_ptr<Inventory>(inv.get(), [this](Inventory* ptr) {
|
||||
remove(ptr->getId());
|
||||
});
|
||||
}
|
||||
|
||||
void Inventories::store(std::shared_ptr<Inventory> inv) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue