Use C++ 14 alignas(), init some struct fields just because of good practice.

This commit is contained in:
Markus F.X.J. Oberhumer
2021-01-04 21:02:07 +01:00
parent 2575eef3c0
commit 9aef7b0d6f
5 changed files with 42 additions and 47 deletions
+1 -6
View File
@@ -286,13 +286,8 @@ typedef size_t upx_rsize_t;
#endif
#if (ACC_CC_MSC)
#define __packed_struct(s) struct s {
#define __packed_struct(s) struct alignas(1) s {
#define __packed_struct_end() };
#else
#define __packed_struct(s) __acc_struct_packed(s)
#define __packed_struct_end() __acc_struct_packed_end()
#endif
#define UNUSED(var) ACC_UNUSED(var)
#define COMPILE_TIME_ASSERT(e) ACC_COMPILE_TIME_ASSERT(e)