summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/lldir.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-06-18 11:55:30 -0700
committerBrad Linden <brad@lindenlab.com>2024-06-18 11:55:30 -0700
commit6393e88ca47998fc5dfae3ce2fc2fd41bf568f49 (patch)
treea0c17d1b8e499740934f88780b2043e264eab078 /indra/llfilesystem/lldir.cpp
parentd0dfffe659b24f5a6bfadc5cc612869e1f08bb93 (diff)
parent4e593dcded0ab1cc033a9be4d0489d12a8305a7e (diff)
Merge remote-tracking branch 'origin/develop' into brad/webrtc-voice-develop
Diffstat (limited to 'indra/llfilesystem/lldir.cpp')
-rw-r--r--indra/llfilesystem/lldir.cpp8
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] = '_';
}