summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-11-19 01:47:21 -0500
committerLioncash <mathew1800@gmail.com>2017-11-19 01:49:39 -0500
commit518f6a362473fe73b395cb4020c1f8d2eef79d2a (patch)
treecbd5ae41b5a87966390ad10f3b0f3455654b4b8c /Source/Core/VideoCommon/TextureCacheBase.cpp
parent9b100c6112aec51fe1f57a4d8902d93733209831 (diff)
VideoCommon: Resolve -Wmissing-brace warnings
Resolves around 5 -Wmissing-brace warnings on macOS.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 07b6609282..afc5fd151f 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -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] =