Use String.repeat() in more places

This commit is contained in:
VolTer
2023-01-29 00:52:05 +01:00
parent 10d22a4b35
commit 6b84e258d2
12 changed files with 37 additions and 94 deletions

View File

@ -34,13 +34,7 @@
void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, uint32_t p_block_size) {
magic = p_magic.ascii().get_data();
if (magic.length() > 4) {
magic = magic.substr(0, 4);
} else {
while (magic.length() < 4) {
magic += " ";
}
}
magic = (magic + " ").substr(0, 4);
cmode = p_mode;
block_size = p_block_size;