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
@@ -108,16 +108,16 @@ namespace gui {
/// (does not add node to the main container)
/// @param name node key
/// @param node target node
void store(std::string name, std::shared_ptr<UINode> node);
void store(const std::string& name, std::shared_ptr<UINode> node);
/// @brief Get node from the GUI nodes dictionary
/// @param name node key
/// @return stored node or nullptr
std::shared_ptr<UINode> get(std::string name) noexcept;
std::shared_ptr<UINode> get(const std::string& name) noexcept;
/// @brief Remove node from the GUI nodes dictionary
/// @param name node key
void remove(std::string name) noexcept;
void remove(const std::string& name) noexcept;
/// @brief Set node as focused
/// @param node new focused node or nullptr to remove focus
@@ -129,7 +129,7 @@ namespace gui {
void onAssetsLoad(Assets* assets);
void postRunnable(runnable callback);
void postRunnable(const runnable& callback);
void setDoubleClickDelay(float delay);
float getDoubleClickDelay() const;