summaryrefslogtreecommitdiffstats
path: root/scene/theme
diff options
context:
space:
mode:
authorMuller-Castro <37383316+Muller-Castro@users.noreply.github.com>2021-08-01 16:47:20 -0300
committerMuller-Castro <37383316+Muller-Castro@users.noreply.github.com>2024-01-05 14:49:57 -0300
commit96a95cb9743e755f10fa6a14895ea099e5ac4c51 (patch)
tree8ccdf0cc23500519680490cc6b2078889117f904 /scene/theme
parent89cc635c0554cb2e518c830969ca4c5eedda0f4e (diff)
downloadredot-engine-96a95cb9743e755f10fa6a14895ea099e5ac4c51.tar.gz
Add const lvalue ref to container parameters
Diffstat (limited to 'scene/theme')
-rw-r--r--scene/theme/theme_owner.cpp4
-rw-r--r--scene/theme/theme_owner.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/theme/theme_owner.cpp b/scene/theme/theme_owner.cpp
index 2852a64e39..b559c8c58d 100644
--- a/scene/theme/theme_owner.cpp
+++ b/scene/theme/theme_owner.cpp
@@ -249,7 +249,7 @@ void ThemeOwner::get_theme_type_dependencies(const Node *p_for_node, const Strin
ThemeDB::get_singleton()->get_native_type_dependencies(p_theme_type, r_list);
}
-Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
+Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types) {
ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, Variant(), "At least one theme type must be specified.");
// First, look through each control or window node in the branch, until no valid parent can be found.
@@ -285,7 +285,7 @@ Variant ThemeOwner::get_theme_item_in_types(Theme::DataType p_data_type, const S
return global_context->get_fallback_theme()->get_theme_item(p_data_type, p_name, StringName());
}
-bool ThemeOwner::has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
+bool ThemeOwner::has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types) {
ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, false, "At least one theme type must be specified.");
// First, look through each control or window node in the branch, until no valid parent can be found.
diff --git a/scene/theme/theme_owner.h b/scene/theme/theme_owner.h
index 4923ccb00b..7e19279c2a 100644
--- a/scene/theme/theme_owner.h
+++ b/scene/theme/theme_owner.h
@@ -71,8 +71,8 @@ public:
void get_theme_type_dependencies(const Node *p_for_node, const StringName &p_theme_type, List<StringName> *r_list) const;
- Variant get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
- bool has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
+ Variant get_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types);
+ bool has_theme_item_in_types(Theme::DataType p_data_type, const StringName &p_name, const List<StringName> &p_theme_types);
float get_theme_default_base_scale();
Ref<Font> get_theme_default_font();