General: Remove usages of ARRAY_SIZE where applicable. (#5392)

Same behavior, but without our own boilerplate function.
This commit is contained in:
LC
2020-06-19 10:10:45 -04:00
committed by GitHub
parent f7aaa37bf2
commit 8ce81b19be
10 changed files with 35 additions and 29 deletions

View File

@@ -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);