General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
This commit is contained in:
@@ -675,7 +675,7 @@ std::u16string Module::GetUsername() {
|
||||
|
||||
// the username string in the block isn't null-terminated,
|
||||
// so we need to find the end manually.
|
||||
std::u16string username(block.username, ARRAY_SIZE(block.username));
|
||||
std::u16string username(block.username, std::size(block.username));
|
||||
const std::size_t pos = username.find(u'\0');
|
||||
if (pos != std::u16string::npos)
|
||||
username.erase(pos);
|
||||
|
||||
Reference in New Issue
Block a user