summaryrefslogtreecommitdiff
path: root/scene/resources/theme.cpp
diff options
context:
space:
mode:
authorAnilforextra <anilforextra@gmail.com>2022-02-03 21:48:38 +0545
committerAnilforextra <anilforextra@gmail.com>2022-02-04 01:28:02 +0545
commitadbe948bda202209b55249198e1837324e703ddb (patch)
treea7f424318e1d944e0564edb6fc55e8eabf266bd0 /scene/resources/theme.cpp
parentbf12719ccabcea9bf9b274f77511e02581678774 (diff)
String: Add contains().
Diffstat (limited to 'scene/resources/theme.cpp')
-rw-r--r--scene/resources/theme.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 8da287042e..f962e55666 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -46,7 +46,7 @@ int Theme::fallback_font_size = 16;
bool Theme::_set(const StringName &p_name, const Variant &p_value) {
String sname = p_name;
- if (sname.find("/") != -1) {
+ if (sname.contains("/")) {
String type = sname.get_slicec('/', 1);
String theme_type = sname.get_slicec('/', 0);
String name = sname.get_slicec('/', 2);
@@ -78,7 +78,7 @@ bool Theme::_set(const StringName &p_name, const Variant &p_value) {
bool Theme::_get(const StringName &p_name, Variant &r_ret) const {
String sname = p_name;
- if (sname.find("/") != -1) {
+ if (sname.contains("/")) {
String type = sname.get_slicec('/', 1);
String theme_type = sname.get_slicec('/', 0);
String name = sname.get_slicec('/', 2);