mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Use unique_ptr for trivial ownership (#16300)
This commit is contained in:
parent
08bc036311
commit
5b37614d23
10 changed files with 44 additions and 59 deletions
|
@ -18,13 +18,10 @@
|
|||
*/
|
||||
|
||||
NodeMetadata::NodeMetadata(IItemDefManager *item_def_mgr):
|
||||
m_inventory(new Inventory(item_def_mgr))
|
||||
m_inventory(std::make_unique<Inventory>(item_def_mgr))
|
||||
{}
|
||||
|
||||
NodeMetadata::~NodeMetadata()
|
||||
{
|
||||
delete m_inventory;
|
||||
}
|
||||
NodeMetadata::~NodeMetadata() = default;
|
||||
|
||||
void NodeMetadata::serialize(std::ostream &os, u8 version, bool disk) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue