Always reserve padding for structs that need it

This commit is contained in:
2026-01-03 17:04:36 +00:00
parent b372447a46
commit 83b879a180
6 changed files with 9 additions and 15 deletions

View File

@@ -10,7 +10,7 @@
#ifdef WAPP_PLATFORM_CPP
BEGIN_C_LINKAGE
#define wapp_tester_result(PASSED) (TestFuncResult{wapp_str8_lit_ro(__func__), PASSED})
#define wapp_tester_result(PASSED) (TestFuncResult{wapp_str8_lit_ro(__func__), PASSED, {}})
#else
#define wapp_tester_result(PASSED) ((TestFuncResult){.name = wapp_str8_lit_ro(__func__), .passed = PASSED})
#endif // !WAPP_PLATFORM_CPP
@@ -22,9 +22,7 @@ struct TestFuncResult {
Str8 name;
b8 passed;
#ifdef WAPP_PLATFORM_WINDOWS
wapp_misc_utils_padding_size(sizeof(Str8RO) + sizeof(b8));
#endif // WAPP_PLATFORM_WINDOWS
wapp_misc_utils_reserve_padding(sizeof(Str8) + sizeof(b8));
};
typedef TestFuncResult(TestFunc)(void);