summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:44:22 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:55:42 +0000
commit860c270c73048b4930ac8cbebcd60be746eb9782 (patch)
treea88a8acb208cf426ae8fac05dda202c57b59426a /src/screenshot.cpp
parent395a5d9991b500c681ff384f8d3b4e153e687abb (diff)
downloadopenttd-860c270c73048b4930ac8cbebcd60be746eb9782.tar.xz
Codechange: Replace assert_compile macro with static_assert
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r--src/screenshot.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index b7abab8fc..b832e2224 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -81,7 +81,7 @@ PACK(struct BitmapFileHeader {
uint32 reserved;
uint32 off_bits;
});
-assert_compile(sizeof(BitmapFileHeader) == 14);
+static_assert(sizeof(BitmapFileHeader) == 14);
/** BMP Info Header (stored in little endian) */
struct BitmapInfoHeader {
@@ -90,13 +90,13 @@ struct BitmapInfoHeader {
uint16 planes, bitcount;
uint32 compression, sizeimage, xpels, ypels, clrused, clrimp;
};
-assert_compile(sizeof(BitmapInfoHeader) == 40);
+static_assert(sizeof(BitmapInfoHeader) == 40);
/** Format of palette data in BMP header */
struct RgbQuad {
byte blue, green, red, reserved;
};
-assert_compile(sizeof(RgbQuad) == 4);
+static_assert(sizeof(RgbQuad) == 4);
/**
* Generic .BMP writer
@@ -419,7 +419,7 @@ struct PcxHeader {
uint16 height;
byte filler[54];
};
-assert_compile(sizeof(PcxHeader) == 128);
+static_assert(sizeof(PcxHeader) == 128);
/**
* Generic .PCX file image writer.