1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Provide static_assert for hard-coded struct sizes.

This commit is contained in:
Michał Janiszewski
2016-06-02 20:40:29 +02:00
parent 3907fcd9d2
commit df3030e4a9
34 changed files with 151 additions and 14 deletions

View File

@@ -80,6 +80,7 @@ typedef struct rct_colour_map_a {
uint8 lighter;
uint8 lightest;
} PACKED rct_colour_map_a;
STATIC_ASSERT (sizeof(rct_colour_map_a) == 8, "Improper struct size");
typedef struct rct_colour_map_b {
uint8 a;
@@ -91,6 +92,7 @@ typedef struct rct_colour_map_b {
uint8 g;
uint8 h;
} PACKED rct_colour_map_b;
STATIC_ASSERT (sizeof(rct_colour_map_b) == 8, "Improper struct size");
extern rct_colour_map_a *ColourMapA;
extern rct_colour_map_b *ColourMapB;