Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
This commit is contained in:
@ -92,8 +92,8 @@ void POTGenerator::generate_pot(const String &p_file) {
|
||||
}
|
||||
|
||||
if (GLOBAL_GET("internationalization/locale/translation_add_builtin_strings_to_pot")) {
|
||||
for (int i = 0; i < extractable_msgids.size(); i++) {
|
||||
_add_new_msgid(extractable_msgids[i], "", "", "");
|
||||
for (const StringName &extractable_msgid : extractable_msgids) {
|
||||
_add_new_msgid(extractable_msgid, "", "", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user