File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/vtfparser/file-format-objects Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
#include < cstdint>
6
6
#include " enums.hpp"
7
7
8
+ #ifdef _MSC_VER
9
+ #define align (x ) alignas (x)
10
+ #else
11
+ #define align (x ) __attribute__((aligned(x)))
12
+ #endif
13
+
8
14
namespace VtfParser {
9
15
#pragma pack(push, 1)
10
16
@@ -29,7 +35,7 @@ namespace VtfParser {
29
35
/* *
30
36
* Aligned full header (only for alignment reasons, do not use outside of Header declaration).
31
37
*/
32
- struct __attribute__ ((aligned( 16 )) ) HeaderFullAligned : public HeaderBase {
38
+ struct align ( 16 ) HeaderFullAligned : public HeaderBase {
33
39
/* *
34
40
* Width of the largest mipmap in pixels. Must be a power of 2.
35
41
*/
@@ -131,3 +137,5 @@ namespace VtfParser {
131
137
132
138
#pragma pack(pop)
133
139
}
140
+
141
+ #undef align
You can’t perform that action at this time.
0 commit comments