klenin / Spawner

Cross-platform sandbox runner
4 stars 8 forks source link

Fix unconsistent usage of WinAPI *A() and *W() functions. #68

Open cher-nov opened 7 years ago

cher-nov commented 7 years ago

There's no necessity in the usage of ANSI versions of WinAPI functions since minimum supported WIndows version is Windows XP.

Proposal:

  1. Define UNICODE macro project-wide when compiling for Windows.
  2. Replace all calls to *A() and *W() by simple calls without suffixes (that wil be mapped to *W() functions due to UNICODE defined.
  3. Ruthlessly eliminate multibyte.cpp and replace it by usage of the std::wstring and C++11 <codecvt> where needed.
cher-nov commented 7 years ago

TODO: add CREATE_UNICODE_ENVIRONMENT when migrating onto Unicode WinAPI