COMMON: Avoid unnecessary object creation

This commit is contained in:
Eugene Sandulenko 2021-08-01 14:55:39 +02:00
parent 11e486d631
commit e79e58e077
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -304,7 +304,7 @@ String punycode_encodefilename(const String src) {
dst += '\x81';
dst += '\x79';
// Encode special symbols and non-printables
} else if (Common::String("/\":*[]+|\\?%<>,;=").contains(src[i]) || (byte)src[i] < 0x20) {
} else if (strchr("/\":*[]+|\\?%<>,;=", src[i]) || (byte)src[i] < 0x20) {
dst += '\x81';
dst += (byte)src[i] + '\x80';
} else {