Codechange: replace lengthof with std::size in Windows specific code

This commit is contained in:
rubidium42
2024-04-10 20:12:33 +02:00
committed by rubidium42
parent 6bc4a62c27
commit 442daf58da
6 changed files with 17 additions and 17 deletions

View File

@@ -203,7 +203,7 @@ static FILE *FioFOpenFileSp(const std::string &filename, const char *mode, Searc
* a string, but a variable, it 'renames' the variable,
* so make that variable to makes it compile happily */
wchar_t Lmode[5];
MultiByteToWideChar(CP_ACP, 0, mode, -1, Lmode, lengthof(Lmode));
MultiByteToWideChar(CP_ACP, 0, mode, -1, Lmode, static_cast<int>(std::size(Lmode)));
#endif
FILE *f = nullptr;
std::string buf;