summaryrefslogtreecommitdiffstats
path: root/editor/editor_translation_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_translation_parser.cpp')
-rw-r--r--editor/editor_translation_parser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp
index 813d7c486f..8a77ce4a82 100644
--- a/editor/editor_translation_parser.cpp
+++ b/editor/editor_translation_parser.cpp
@@ -93,8 +93,8 @@ void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensio
custom_parsers[i]->get_recognized_extensions(&temp);
}
// Remove duplicates.
- for (int i = 0; i < temp.size(); i++) {
- extensions.insert(temp[i]);
+ for (const String &E : temp) {
+ extensions.insert(E);
}
for (const String &E : extensions) {
r_extensions->push_back(E);
@@ -104,8 +104,8 @@ void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensio
bool EditorTranslationParser::can_parse(const String &p_extension) const {
List<String> extensions;
get_recognized_extensions(&extensions);
- for (int i = 0; i < extensions.size(); i++) {
- if (p_extension == extensions[i]) {
+ for (const String &extension : extensions) {
+ if (p_extension == extension) {
return true;
}
}
@@ -117,8 +117,8 @@ Ref<EditorTranslationParserPlugin> EditorTranslationParser::get_parser(const Str
for (int i = 0; i < custom_parsers.size(); i++) {
List<String> temp;
custom_parsers[i]->get_recognized_extensions(&temp);
- for (int j = 0; j < temp.size(); j++) {
- if (temp[j] == p_extension) {
+ for (const String &E : temp) {
+ if (E == p_extension) {
return custom_parsers[i];
}
}
@@ -127,8 +127,8 @@ Ref<EditorTranslationParserPlugin> EditorTranslationParser::get_parser(const Str
for (int i = 0; i < standard_parsers.size(); i++) {
List<String> temp;
standard_parsers[i]->get_recognized_extensions(&temp);
- for (int j = 0; j < temp.size(); j++) {
- if (temp[j] == p_extension) {
+ for (const String &E : temp) {
+ if (E == p_extension) {
return standard_parsers[i];
}
}