mirror of
https://github.com/xenia-project/xenia.git
synced 2024-12-03 00:57:35 +00:00
Standardizing wchar->char in main().
This commit is contained in:
parent
c8b544ffd4
commit
c93b93fe55
@ -13,6 +13,8 @@
|
||||
#include <gflags/gflags.h>
|
||||
#include <io.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
// Autogenerated by `xb premake`.
|
||||
#include "build/version.h"
|
||||
|
||||
@ -72,7 +74,7 @@ int Main() {
|
||||
for (int n = 0; n < argca; n++) {
|
||||
size_t len = wcslen(argv[n]);
|
||||
argva[n] = reinterpret_cast<char*>(alloca(len + 1));
|
||||
wcstombs_s(nullptr, argva[n], len + 1, argv[n], _TRUNCATE);
|
||||
std::wcstombs(argva[n], argv[n], len + 1);
|
||||
}
|
||||
|
||||
// Parse flags; this may delete some of them.
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <codecvt>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <locale>
|
||||
#include <string>
|
||||
@ -33,7 +33,7 @@ int main(int argc, wchar_t* argv[]) {
|
||||
for (int n = 0; n < argca; n++) {
|
||||
size_t len = wcslen(argv[n]);
|
||||
argva[n] = (char*)alloca(len + 1);
|
||||
wcstombs_s(nullptr, argva[n], len + 1, argv[n], _TRUNCATE);
|
||||
std::wcstombs(argva[n], argv[n], len + 1);
|
||||
}
|
||||
|
||||
// Parse flags; this may delete some of them.
|
||||
|
Loading…
Reference in New Issue
Block a user