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:
2026-07-12 11:52:53 +02:00
parent c684a15fb9
commit 30eccf749d
155 changed files with 3333 additions and 6171 deletions

View File

@@ -9,13 +9,11 @@
using namespace coop;
namespace
{
namespace {
int g_failures = 0;
void check(bool ok, const char* what)
{
if (!ok)
{
if (!ok) {
std::printf("FAIL: %s\n", what);
++g_failures;
}
@@ -47,8 +45,7 @@ int main()
float out[4] = {};
mix_store(reinterpret_cast<std::uint8_t*>(out), acc, 4, kWaveFormatFloat, 32);
// Sum then tanh; small sums are ~unchanged.
for (int i = 0; i < 4; ++i)
{
for (int i = 0; i < 4; ++i) {
check(near_f(out[i], std::tanh(a[i] + b[i])), "float32 mix == tanh(sum)");
}
}
@@ -57,8 +54,7 @@ int main()
{
float acc[2] = {};
const float loud[2] = {0.9f, -0.9f};
for (int s = 0; s < 5; ++s)
{
for (int s = 0; s < 5; ++s) {
mix_add(acc, reinterpret_cast<const std::uint8_t*>(loud), 2, kWaveFormatFloat, 32);
}
float out[2] = {};
@@ -79,8 +75,7 @@ int main()
check(std::abs(out[0] - 1000) <= 3 && std::abs(out[1] - (-2000)) <= 3, "int16 round-trip");
}
if (g_failures == 0)
{
if (g_failures == 0) {
std::printf("PASS: audio_mix_test\n");
return 0;
}