diff options
| author | JosJuice <josjuice@gmail.com> | 2017-11-19 08:45:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-19 08:45:13 +0100 |
| commit | 2ead31c7697cb2e25e3fca4bd9d492cb66f93342 (patch) | |
| tree | 46f153c8097d2e24bcc9b0f11a36f594f3b40858 /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 2385a03c2baa5f4d1d65f9af86801f624a59a988 (diff) | |
| parent | 518f6a362473fe73b395cb4020c1f8d2eef79d2a (diff) | |
Merge pull request #6203 from lioncash/missing-braces-warn
VideoCommon: Resolve -Wmissing-brace warnings
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 9 |
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] = |
