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.
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
static const int CONTAINER_ID_INVENTORY = 0;
|
||||
static const int CONTAINER_ID_CREATIVE = -2;
|
||||
|
||||
vector<shared_ptr<ItemInstance> > *lastSlots;
|
||||
vector<std::shared_ptr<ItemInstance> > *lastSlots;
|
||||
vector<Slot *> *slots;
|
||||
int containerId;
|
||||
|
||||
@@ -46,34 +46,34 @@ protected:
|
||||
public:
|
||||
virtual ~AbstractContainerMenu();
|
||||
virtual void addSlotListener(ContainerListener *listener);
|
||||
vector<shared_ptr<ItemInstance> > *getItems();
|
||||
vector<std::shared_ptr<ItemInstance> > *getItems();
|
||||
void sendData(int id, int value);
|
||||
virtual void broadcastChanges();
|
||||
virtual bool needsRendered();
|
||||
virtual bool clickMenuButton(shared_ptr<Player> player, int buttonId);
|
||||
Slot *getSlotFor(shared_ptr<Container> c, int index);
|
||||
virtual bool clickMenuButton(std::shared_ptr<Player> player, int buttonId);
|
||||
Slot *getSlotFor(std::shared_ptr<Container> c, int index);
|
||||
Slot *getSlot(int index);
|
||||
virtual shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex);
|
||||
virtual shared_ptr<ItemInstance> clicked(int slotIndex, int buttonNum, int clickType, shared_ptr<Player> player);
|
||||
virtual bool mayCombine(Slot *slot, shared_ptr<ItemInstance> item);
|
||||
virtual std::shared_ptr<ItemInstance> quickMoveStack(std::shared_ptr<Player> player, int slotIndex);
|
||||
virtual std::shared_ptr<ItemInstance> clicked(int slotIndex, int buttonNum, int clickType, std::shared_ptr<Player> player);
|
||||
virtual bool mayCombine(Slot *slot, std::shared_ptr<ItemInstance> item);
|
||||
protected:
|
||||
virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, shared_ptr<Player> player);
|
||||
virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, std::shared_ptr<Player> player);
|
||||
public:
|
||||
virtual void removed(shared_ptr<Player> player);
|
||||
virtual void slotsChanged();// 4J used to take a shared_ptr<Container> container but wasn't using it, so removed to simplify things
|
||||
virtual void removed(std::shared_ptr<Player> player);
|
||||
virtual void slotsChanged();// 4J used to take a std::shared_ptr<Container> container but wasn't using it, so removed to simplify things
|
||||
bool isPauseScreen();
|
||||
void setItem(unsigned int slot, shared_ptr<ItemInstance> item);
|
||||
void setItem(unsigned int slot, std::shared_ptr<ItemInstance> item);
|
||||
void setAll(ItemInstanceArray *items);
|
||||
virtual void setData(int id, int value);
|
||||
short backup(shared_ptr<Inventory> inventory);
|
||||
short backup(std::shared_ptr<Inventory> inventory);
|
||||
|
||||
private:
|
||||
unordered_set<shared_ptr<Player> , PlayerKeyHash, PlayerKeyEq> unSynchedPlayers;
|
||||
unordered_set<std::shared_ptr<Player> , PlayerKeyHash, PlayerKeyEq> unSynchedPlayers;
|
||||
|
||||
public:
|
||||
bool isSynched(shared_ptr<Player> player);
|
||||
void setSynched(shared_ptr<Player> player, bool synched);
|
||||
virtual bool stillValid(shared_ptr<Player> player) = 0;
|
||||
bool isSynched(std::shared_ptr<Player> player);
|
||||
void setSynched(std::shared_ptr<Player> player, bool synched);
|
||||
virtual bool stillValid(std::shared_ptr<Player> player) = 0;
|
||||
|
||||
// 4J Stu Added for UI
|
||||
unsigned int getSize() { return (unsigned int)slots->size(); }
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
protected:
|
||||
// 4J Stu - Changes to return bool brought forward from 1.2
|
||||
bool moveItemStackTo(shared_ptr<ItemInstance> itemStack, int startSlot, int endSlot, bool backwards);
|
||||
bool moveItemStackTo(std::shared_ptr<ItemInstance> itemStack, int startSlot, int endSlot, bool backwards);
|
||||
|
||||
public:
|
||||
virtual bool isOverrideResultClick(int slotNum, int buttonNum);
|
||||
|
||||
Reference in New Issue
Block a user