Optimize parameter passing to avoid unnecessary copying

This commit is contained in:
Pugemon
2024-06-07 04:00:38 +03:00
parent 46ca1bb04a
commit f25a425cb9
123 changed files with 578 additions and 522 deletions
+4 -4
View File
@@ -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();
};
}