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
+3 -3
View File
@@ -10,12 +10,12 @@ namespace gui {
protected:
std::shared_ptr<Label> label = nullptr;
public:
Button(std::shared_ptr<UINode> content,
Button(const std::shared_ptr<UINode>& content,
glm::vec4 padding=glm::vec4(2.0f));
Button(std::wstring text,
Button(const std::wstring& text,
glm::vec4 padding,
onaction action,
const onaction& action,
glm::vec2 size=glm::vec2(-1));
virtual void drawBackground(const DrawContext* pctx, Assets* assets) override;