1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Use (r)find_char instead of (r)find for single characters

This commit is contained in:
A Thousand Ships
2024-11-16 18:52:15 +01:00
parent 5efd124ca1
commit 68f638cf02
70 changed files with 169 additions and 169 deletions

View File

@@ -53,7 +53,7 @@ void ImageLoaderSVG::_replace_color_property(const HashMap<Color, Color> &p_colo
int pos = r_string.find(p_prefix);
while (pos != -1) {
pos += prefix_len; // Skip prefix.
int end_pos = r_string.find("\"", pos);
int end_pos = r_string.find_char('"', pos);
ERR_FAIL_COND_MSG(end_pos == -1, vformat("Malformed SVG string after property \"%s\".", p_prefix));
const String color_code = r_string.substr(pos, end_pos - pos);
if (color_code != "none" && !color_code.begins_with("url(")) {