From b08c04b87a13c737ad7decd1a760129d6d161956 Mon Sep 17 00:00:00 2001 From: xiaohunqupo Date: Thu, 31 Mar 2022 15:08:12 +0800 Subject: [PATCH] Fix compile errro in VC140 --- include/assimp/Bitmap.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/assimp/Bitmap.h b/include/assimp/Bitmap.h index 6a614f7cf..94dd0b81b 100644 --- a/include/assimp/Bitmap.h +++ b/include/assimp/Bitmap.h @@ -78,11 +78,11 @@ protected: // We define the struct size because sizeof(Header) might return a wrong result because of structure padding. static constexpr std::size_t header_size = - sizeof(type) + - sizeof(size) + - sizeof(reserved1) + - sizeof(reserved2) + - sizeof(offset); + sizeof(uint16_t) + + sizeof(uint32_t) + + sizeof(uint16_t) + + sizeof(uint16_t) + + sizeof(uint32_t); }; struct DIB { @@ -100,17 +100,17 @@ protected: // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding. static constexpr std::size_t dib_size = - sizeof(size) + - sizeof(width) + - sizeof(height) + - sizeof(planes) + - sizeof(bits_per_pixel) + - sizeof(compression) + - sizeof(image_size) + - sizeof(x_resolution) + - sizeof(y_resolution) + - sizeof(nb_colors) + - sizeof(nb_important_colors); + sizeof(uint32_t) + + sizeof(int32_t) + + sizeof(int32_t) + + sizeof(uint16_t) + + sizeof(uint16_t) + + sizeof(uint32_t) + + sizeof(uint32_t) + + sizeof(int32_t) + + sizeof(int32_t) + + sizeof(uint32_t) + + sizeof(uint32_t); }; static constexpr std::size_t mBytesPerPixel = 4;