diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-06-18 11:48:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 11:48:37 -0700 |
commit | 4e593dcded0ab1cc033a9be4d0489d12a8305a7e (patch) | |
tree | eb12b6af64b6da0444776034025fec9141ce41ce /indra/llfilesystem/lldir.cpp | |
parent | 3da16d1899324b358ac0d27ddd99bf8214f6fb54 (diff) | |
parent | 7342ebf43aa7500afe7410b49689a3aefa669e58 (diff) |
Merge pull request #1797 from secondlife/release/maint-a
merge release/maint-a into develop and close maint-a
Diffstat (limited to 'indra/llfilesystem/lldir.cpp')
-rw-r--r-- | indra/llfilesystem/lldir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index 483ef0fd02..8ee2c309a5 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -876,15 +876,15 @@ std::string LLDir::getTempFilename() const } // static -std::string LLDir::getScrubbedFileName(const std::string uncleanFileName) +std::string LLDir::getScrubbedFileName(std::string_view uncleanFileName) { std::string name(uncleanFileName); const std::string illegalChars(getForbiddenFileChars()); // replace any illegal file chars with and underscore '_' - for( unsigned int i = 0; i < illegalChars.length(); i++ ) + for (const char& ch : illegalChars) { - std::string::size_type j = -1; - while((j = name.find(illegalChars[i])) > std::string::npos) + std::string::size_type j{ 0 }; + while ((j = name.find(ch, j)) != std::string::npos) { name[j] = '_'; } |