Ditch decltype
parent
632e4a20a9
commit
8d20460ae4
|
@ -76,11 +76,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(decltype(type)) +
|
sizeof(type) +
|
||||||
sizeof(decltype(size)) +
|
sizeof(size) +
|
||||||
sizeof(decltype(reserved1)) +
|
sizeof(reserved1) +
|
||||||
sizeof(decltype(reserved2)) +
|
sizeof(reserved2) +
|
||||||
sizeof(decltype(offset));
|
sizeof(offset);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DIB {
|
struct DIB {
|
||||||
|
@ -98,17 +98,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(decltype(size)) +
|
sizeof(size) +
|
||||||
sizeof(decltype(width)) +
|
sizeof(width) +
|
||||||
sizeof(decltype(height)) +
|
sizeof(height) +
|
||||||
sizeof(decltype(planes)) +
|
sizeof(planes) +
|
||||||
sizeof(decltype(bits_per_pixel)) +
|
sizeof(bits_per_pixel) +
|
||||||
sizeof(decltype(compression)) +
|
sizeof(compression) +
|
||||||
sizeof(decltype(image_size)) +
|
sizeof(image_size) +
|
||||||
sizeof(decltype(x_resolution)) +
|
sizeof(x_resolution) +
|
||||||
sizeof(decltype(y_resolution)) +
|
sizeof(y_resolution) +
|
||||||
sizeof(decltype(nb_colors)) +
|
sizeof(nb_colors) +
|
||||||
sizeof(decltype(nb_important_colors));
|
sizeof(nb_important_colors);
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr std::size_t mBytesPerPixel = 4;
|
static constexpr std::size_t mBytesPerPixel = 4;
|
||||||
|
|
Loading…
Reference in New Issue