summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-06-18 21:21:45 +0100
committerPatric Stout <truebrain@openttd.org>2018-07-19 20:24:17 +0200
commit63898f61b0ce4e321b5a7c39da2cfb5b16cfde5f (patch)
tree549ee0acd8d9af0f946cd8024e2d4839f82aeca8 /src/screenshot.cpp
parent93469a92f20246d100d6ca8888ba621223e480ff (diff)
downloadopenttd-63898f61b0ce4e321b5a7c39da2cfb5b16cfde5f.tar.xz
Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r--src/screenshot.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index a24cc6b21..1e7a45645 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -71,23 +71,16 @@ struct ScreenshotFormat {
/*************************************************
**** SCREENSHOT CODE FOR WINDOWS BITMAP (.BMP)
*************************************************/
-#if defined(_MSC_VER) || defined(__WATCOMC__)
-#pragma pack(push, 1)
-#endif
/** BMP File Header (stored in little endian) */
-struct BitmapFileHeader {
+PACK(struct BitmapFileHeader {
uint16 type;
uint32 size;
uint32 reserved;
uint32 off_bits;
-} GCC_PACK;
+});
assert_compile(sizeof(BitmapFileHeader) == 14);
-#if defined(_MSC_VER) || defined(__WATCOMC__)
-#pragma pack(pop)
-#endif
-
/** BMP Info Header (stored in little endian) */
struct BitmapInfoHeader {
uint32 size;