Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
@@ -96,13 +96,13 @@ namespace gui {
|
||||
void setSelected(int index);
|
||||
|
||||
void bind(
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
const std::shared_ptr<Inventory>& inventory,
|
||||
const Content* content
|
||||
);
|
||||
|
||||
void unbind();
|
||||
|
||||
std::shared_ptr<SlotView> addSlot(SlotLayout layout);
|
||||
std::shared_ptr<SlotView> addSlot(const SlotLayout& layout);
|
||||
|
||||
std::shared_ptr<Inventory> getInventory() const;
|
||||
|
||||
@@ -130,10 +130,10 @@ namespace gui {
|
||||
glm::vec2 pos,
|
||||
int padding,
|
||||
bool addpanel,
|
||||
SlotLayout slotLayout
|
||||
const SlotLayout& slotLayout
|
||||
);
|
||||
|
||||
void add(SlotLayout slotLayout);
|
||||
void add(const SlotLayout& slotLayout);
|
||||
std::shared_ptr<InventoryView> build();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user