mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
VideoCommon: Resolve -Wmissing-brace warnings
Resolves around 5 -Wmissing-brace warnings on macOS.
This commit is contained in:
parent
9b100c6112
commit
518f6a3624
2 changed files with 9 additions and 8 deletions
|
@ -483,7 +483,7 @@ public:
|
|||
|
||||
void AddLevel(u32 width, u32 height, u32 row_length, const u8* buffer)
|
||||
{
|
||||
levels.push_back({width, height, row_length, buffer});
|
||||
levels.push_back({{width, height, row_length}, buffer});
|
||||
}
|
||||
|
||||
bool HasArbitraryMipmaps(u8* downsample_buffer) const
|
||||
|
@ -553,7 +553,7 @@ private:
|
|||
static PixelRGBAf Sample(const u8* src, const Shape& src_shape, u32 x, u32 y)
|
||||
{
|
||||
const auto* p = src + (x + y * src_shape.row_length) * 4;
|
||||
return {SRGBToLinear(p[0]), SRGBToLinear(p[1]), SRGBToLinear(p[2]), SRGBToLinear(p[3])};
|
||||
return {{SRGBToLinear(p[0]), SRGBToLinear(p[1]), SRGBToLinear(p[2]), SRGBToLinear(p[3])}};
|
||||
}
|
||||
|
||||
// Puts a downsampled image in dst. dst must be at least width*height*4
|
||||
|
@ -565,9 +565,10 @@ private:
|
|||
{
|
||||
auto x = j * 2;
|
||||
auto y = i * 2;
|
||||
const std::array<PixelRGBAf, 4> samples = {
|
||||
const std::array<PixelRGBAf, 4> samples{{
|
||||
Sample(src, src_shape, x, y), Sample(src, src_shape, x + 1, y),
|
||||
Sample(src, src_shape, x, y + 1), Sample(src, src_shape, x + 1, y + 1)};
|
||||
Sample(src, src_shape, x, y + 1), Sample(src, src_shape, x + 1, y + 1),
|
||||
}};
|
||||
|
||||
auto* dst_pixel = dst + (j + i * dst_shape.row_length) * 4;
|
||||
dst_pixel[0] =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue