fix(console): std::size not available in C++11

This commit is contained in:
superp00t 2023-08-16 21:08:48 -04:00
parent e257ab6c88
commit 532d63bdc5

View File

@ -22,7 +22,7 @@ int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
char buffer[128];
bool showCategories = *arguments == '\0';
auto numTranslation = std::size(s_translation);
auto numTranslation = sizeof(s_translation) / sizeof(CategoryTranslation);
if (showCategories) {
memset(buffer, 0, sizeof(buffer));
@ -70,7 +70,7 @@ int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
}
}
char* wr;
const char* wr = nullptr;
if (buffer[0]) {
auto comma = reinterpret_cast<char*>(SStrChrR(buffer, ','));