Codechange: Replace assert_compile macro with static_assert
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user