summaryrefslogtreecommitdiff
path: root/scene/resources/syntax_highlighter.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-10 08:56:31 +0100
committerGitHub <noreply@github.com>2021-12-10 08:56:31 +0100
commitbdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch)
tree1e366583662397e366d4f84bb334660db37cb5bd /scene/resources/syntax_highlighter.cpp
parent5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff)
parent49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff)
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'scene/resources/syntax_highlighter.cpp')
-rw-r--r--scene/resources/syntax_highlighter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp
index cfb5ac2ca6..800752d597 100644
--- a/scene/resources/syntax_highlighter.cpp
+++ b/scene/resources/syntax_highlighter.cpp
@@ -493,7 +493,7 @@ void CodeHighlighter::add_color_region(const String &p_start_key, const String &
color_region.color = p_color;
color_region.start_key = p_start_key;
color_region.end_key = p_end_key;
- color_region.line_only = p_line_only || p_end_key == "";
+ color_region.line_only = p_line_only || p_end_key.is_empty();
color_regions.insert(at, color_region);
clear_highlighting_cache();
}
@@ -529,7 +529,7 @@ void CodeHighlighter::set_color_regions(const Dictionary &p_color_regions) {
String start_key = key.get_slice(" ", 0);
String end_key = key.get_slice_count(" ") > 1 ? key.get_slice(" ", 1) : String();
- add_color_region(start_key, end_key, p_color_regions[key], end_key == "");
+ add_color_region(start_key, end_key, p_color_regions[key], end_key.is_empty());
}
clear_highlighting_cache();
}