diff options
Diffstat (limited to 'scene/resources/syntax_highlighter.cpp')
-rw-r--r-- | scene/resources/syntax_highlighter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 52a3abf74d..2efda08e08 100644 --- a/scene/resources/syntax_highlighter.cpp +++ b/scene/resources/syntax_highlighter.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -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(); } @@ -501,7 +501,7 @@ void CodeHighlighter::add_color_region(const String &p_start_key, const String & void CodeHighlighter::remove_color_region(const String &p_start_key) { for (int i = 0; i < color_regions.size(); i++) { if (color_regions[i].start_key == p_start_key) { - color_regions.remove(i); + color_regions.remove_at(i); break; } } @@ -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(); } |