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
@@ -32,7 +32,7 @@ public:
UiDocument(
std::string id,
uidocscript script,
std::shared_ptr<gui::UINode> root,
const std::shared_ptr<gui::UINode> &root,
scriptenv env
);
@@ -46,8 +46,8 @@ public:
const uidocscript& getScript() const;
scriptenv getEnvironment() const;
static std::unique_ptr<UiDocument> read(scriptenv parent_env, std::string name, fs::path file);
static std::shared_ptr<gui::UINode> readElement(fs::path file);
static std::unique_ptr<UiDocument> read(const scriptenv& parent_env, const std::string& name, const fs::path& file);
static std::shared_ptr<gui::UINode> readElement(const fs::path& file);
};
#endif // FRONTEND_UI_DOCUMENT_HPP_