Files
MinecraftConsoles/Minecraft.World/MenuBackup.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

21 lines
470 B
C++

#pragma once
class AbstractContainerMenu;
class Inventory;
class MenuBackup
{
private:
unordered_map<short, ItemInstanceArray *> *backups;
std::shared_ptr<Inventory> inventory;
AbstractContainerMenu *menu;
public:
MenuBackup(std::shared_ptr<Inventory> inventory, AbstractContainerMenu *menu);
void save(short changeUid);
// Cannot use delete as function name as it is a reserved keyword
void deleteBackup(short changeUid);
void rollback(short changeUid);
};