mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
gcc warning fix
This commit is contained in:
parent
c561466f64
commit
83e7cedffe
4 changed files with 7 additions and 8 deletions
|
|
@ -50,8 +50,7 @@ std::shared_ptr<Inventory> Inventories::clone(int64_t id) {
|
|||
auto original = get(id);
|
||||
if (original == nullptr)
|
||||
return nullptr;
|
||||
auto origptr = reinterpret_cast<const Inventory*>(original.get());
|
||||
auto clone = std::make_shared<Inventory>(*origptr);
|
||||
auto clone = std::make_shared<Inventory>(*original);
|
||||
clone->setId(level.getWorld()->getNextInventoryId());
|
||||
store(clone);
|
||||
return clone;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue