mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-29 00:01:54 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user