1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31:04 +00:00

Use unique_ptr for ServerInventoryManager::DetachedInventory::inventory

This commit is contained in:
Desour 2023-03-03 16:44:04 +01:00 committed by DS
parent 1780d1bbde
commit 1b51ff333a
2 changed files with 12 additions and 18 deletions

View file

@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "inventorymanager.h"
#include <cassert>
#include <functional>
#include <memory>
#include <unordered_map>
class IItemDefManager;
@ -31,7 +32,7 @@ class ServerInventoryManager : public InventoryManager
{
public:
ServerInventoryManager();
virtual ~ServerInventoryManager();
virtual ~ServerInventoryManager() = default;
void setEnv(ServerEnvironment *env)
{
@ -54,7 +55,7 @@ public:
private:
struct DetachedInventory
{
Inventory *inventory;
std::unique_ptr<Inventory> inventory;
std::string owner;
};