Apply clang-format across the whole tree
Run clang-format (the repo's .clang-format: LLVM base, 120 cols, tabs, Allman functions) over every source file so the tree is formatter-clean. Whitespace only -- no behavior change; full x64 + x86 suites pass. Also set SortIncludes: false in .clang-format. Windows include order is load-bearing (windows.h must precede tlhelp32.h / mmreg.h / xinput.h / dinput.h; winsock2.h must precede windows.h), and the default alphabetical sort reorders tlhelp32.h ahead of windows.h -- a build break. Leaving order alone keeps the manual, correct grouping.
This commit is contained in:
@@ -9,14 +9,12 @@
|
||||
|
||||
using namespace coop;
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
int g_failures = 0;
|
||||
void check(bool ok, const char* what)
|
||||
{
|
||||
std::printf("%s %s\n", ok ? " ok:" : "FAIL:", what);
|
||||
if (!ok)
|
||||
{
|
||||
if (!ok) {
|
||||
++g_failures;
|
||||
}
|
||||
}
|
||||
@@ -57,8 +55,7 @@ int main()
|
||||
|
||||
// Round-trip preserves the string (ASCII and a non-ASCII code point that must survive
|
||||
// persist/reload of an override key -- the reason narrow/widen exist instead of a byte mask).
|
||||
for (const wchar_t* s : {L"CoopAllTheThings", L"path\\to\\Game (2).exe", L"café.exe", L"游戏.exe"})
|
||||
{
|
||||
for (const wchar_t* s : {L"CoopAllTheThings", L"path\\to\\Game (2).exe", L"café.exe", L"游戏.exe"}) {
|
||||
check(widen(narrow(std::wstring(s))) == std::wstring(s), "narrow->widen round-trips");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user