diff options
author | Wilson E. Alvarez <wilson.e.alvarez@rubonnek.com> | 2023-11-18 17:40:56 -0500 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez@rubonnek.com> | 2023-12-16 13:36:44 -0500 |
commit | a3cb1b096fcecad03562205bd285ebefc816c64a (patch) | |
tree | 3966ab0682c6269c60de7b438d51b30ae164ffde /scene/gui/tab_bar.cpp | |
parent | 2d0ee20ff30461b6b10f6fdfba87511a0ebc6642 (diff) | |
download | redot-engine-a3cb1b096fcecad03562205bd285ebefc816c64a.tar.gz |
Add const references detected by clang-tidy
Diffstat (limited to 'scene/gui/tab_bar.cpp')
-rw-r--r-- | scene/gui/tab_bar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp index e9fbdbb312..718ccccc2c 100644 --- a/scene/gui/tab_bar.cpp +++ b/scene/gui/tab_bar.cpp @@ -1657,7 +1657,7 @@ bool TabBar::_set(const StringName &p_name, const Variant &p_value) { Vector<String> components = String(p_name).split("/", true, 2); if (components.size() >= 2 && components[0].begins_with("tab_") && components[0].trim_prefix("tab_").is_valid_int()) { int tab_index = components[0].trim_prefix("tab_").to_int(); - String property = components[1]; + const String &property = components[1]; if (property == "title") { set_tab_title(tab_index, p_value); return true; @@ -1676,7 +1676,7 @@ bool TabBar::_get(const StringName &p_name, Variant &r_ret) const { Vector<String> components = String(p_name).split("/", true, 2); if (components.size() >= 2 && components[0].begins_with("tab_") && components[0].trim_prefix("tab_").is_valid_int()) { int tab_index = components[0].trim_prefix("tab_").to_int(); - String property = components[1]; + const String &property = components[1]; if (property == "title") { r_ret = get_tab_title(tab_index); return true; |