Remove CStr::Left

It was only a wrapper around `std::string::substr`. In some places it's
better to use `std::string::starts_with`.
This commit is contained in:
phosit
2026-08-24 13:34:37 +02:00
parent d8bb617962
commit 60824e77b9
8 changed files with 15 additions and 31 deletions
+1 -1
View File
@@ -1613,7 +1613,7 @@ CStrW CNetServerWorker::SanitisePlayerName(const CStrW& original)
// Restrict the length
if (name.length() > MAX_LENGTH)
name = name.Left(MAX_LENGTH);
name = name.substr(0, MAX_LENGTH);
// Don't allow surrounding whitespace
name.Trim(PS_TRIM_BOTH);