Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user