Fix compile errro in VC140

pull/4473/head
xiaohunqupo 2022-03-31 15:08:12 +08:00
parent cc515746f7
commit b08c04b87a
1 changed files with 16 additions and 16 deletions

View File

@ -78,11 +78,11 @@ protected:
// We define the struct size because sizeof(Header) might return a wrong result because of structure padding. // We define the struct size because sizeof(Header) might return a wrong result because of structure padding.
static constexpr std::size_t header_size = static constexpr std::size_t header_size =
sizeof(type) + sizeof(uint16_t) +
sizeof(size) + sizeof(uint32_t) +
sizeof(reserved1) + sizeof(uint16_t) +
sizeof(reserved2) + sizeof(uint16_t) +
sizeof(offset); sizeof(uint32_t);
}; };
struct DIB { struct DIB {
@ -100,17 +100,17 @@ protected:
// We define the struct size because sizeof(DIB) might return a wrong result because of structure padding. // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding.
static constexpr std::size_t dib_size = static constexpr std::size_t dib_size =
sizeof(size) + sizeof(uint32_t) +
sizeof(width) + sizeof(int32_t) +
sizeof(height) + sizeof(int32_t) +
sizeof(planes) + sizeof(uint16_t) +
sizeof(bits_per_pixel) + sizeof(uint16_t) +
sizeof(compression) + sizeof(uint32_t) +
sizeof(image_size) + sizeof(uint32_t) +
sizeof(x_resolution) + sizeof(int32_t) +
sizeof(y_resolution) + sizeof(int32_t) +
sizeof(nb_colors) + sizeof(uint32_t) +
sizeof(nb_important_colors); sizeof(uint32_t);
}; };
static constexpr std::size_t mBytesPerPixel = 4; static constexpr std::size_t mBytesPerPixel = 4;