diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-18 20:32:24 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-18 21:41:00 +0300 |
commit | 7342ebf43aa7500afe7410b49689a3aefa669e58 (patch) | |
tree | b082683a1f490f0f661f7a5413d6a42ea749fadc /indra/llfilesystem/lldir.cpp | |
parent | 810219d3bf27d81751d0f41b65013ca31db34ff7 (diff) |
Follow-up improvements of 810219d3bf27d81751d0f41b65013ca31db34ff7
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 85ae6d4d1d..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( const char &ch : illegalChars) + for (const char& ch : illegalChars) { - std::string::size_type j = -1; - while((j = name.find(ch)) != std::string::npos) + std::string::size_type j{ 0 }; + while ((j = name.find(ch, j)) != std::string::npos) { name[j] = '_'; } |