@@ -189,7 +189,7 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
189189 }
190190 }
191191 msg_context = " " ;
192- l = l.substr (7 , l. length () ).strip_edges ();
192+ l = l.substr (7 ).strip_edges ();
193193 status = STATUS_READING_CONTEXT;
194194 entered_context = true ;
195195 }
@@ -202,7 +202,7 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
202202 }
203203 // We don't record the message in "msgid_plural" itself as tr_n(), TTRN(), RTRN() interfaces provide the plural string already.
204204 // We just have to reset variables related to plurals for "msgstr[]" later on.
205- l = l.substr (12 , l. length () ).strip_edges ();
205+ l = l.substr (12 ).strip_edges ();
206206 plural_index = -1 ;
207207 msgs_plural.clear ();
208208 msgs_plural.resize (plural_forms);
@@ -230,7 +230,7 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
230230 }
231231 }
232232
233- l = l.substr (5 , l. length () ).strip_edges ();
233+ l = l.substr (5 ).strip_edges ();
234234 status = STATUS_READING_ID;
235235 // If we did not encounter msgctxt, we reset context to empty to reset it.
236236 if (!entered_context) {
@@ -246,10 +246,10 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
246246 if (l.begins_with (" msgstr[" )) {
247247 ERR_FAIL_COND_V_MSG (status != STATUS_READING_PLURAL, Ref<Resource>(), vformat (" Unexpected 'msgstr[]', was expecting 'msgid_plural' before 'msgstr[]' while parsing: %s:%d." , path, line));
248248 plural_index++; // Increment to add to the next slot in vector msgs_plural.
249- l = l.substr (9 , l. length () ).strip_edges ();
249+ l = l.substr (9 ).strip_edges ();
250250 } else if (l.begins_with (" msgstr" )) {
251251 ERR_FAIL_COND_V_MSG (status != STATUS_READING_ID, Ref<Resource>(), vformat (" Unexpected 'msgstr', was expecting 'msgid' before 'msgstr' while parsing: %s:%d." , path, line));
252- l = l.substr (6 , l. length () ).strip_edges ();
252+ l = l.substr (6 ).strip_edges ();
253253 status = STATUS_READING_STRING;
254254 }
255255
@@ -263,7 +263,7 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
263263
264264 ERR_FAIL_COND_V_MSG (!l.begins_with (" \" " ) || status == STATUS_NONE, Ref<Resource>(), vformat (" Invalid line '%s' while parsing: %s:%d." , l, path, line));
265265
266- l = l.substr (1 , l. length () );
266+ l = l.substr (1 );
267267 // Find final quote, ignoring escaped ones (\").
268268 // The escape_next logic is necessary to properly parse things like \\"
269269 // where the backslash is the one being escaped, not the quote.
@@ -329,7 +329,7 @@ Ref<Resource> TranslationLoaderPO::load_translation(Ref<FileAccess> f, Error *r_
329329 continue ;
330330 }
331331 String prop = c.substr (0 , p).strip_edges ();
332- String value = c.substr (p + 1 , c. length () ).strip_edges ();
332+ String value = c.substr (p + 1 ).strip_edges ();
333333
334334 if (prop == " X-Language" || prop == " Language" ) {
335335 translation->set_locale (value);
0 commit comments