2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

video_core: Resolve -Wreorder warnings

Ensures that the constructor members are always initialized in the order
that they're declared in.
This commit is contained in:
Lioncash 2019-07-16 11:38:48 -04:00
parent 47df844338
commit 45fa12a05c
2 changed files with 3 additions and 4 deletions

View file

@ -58,7 +58,7 @@ struct BlockInfo {
struct CFGRebuildState { struct CFGRebuildState {
explicit CFGRebuildState(const ProgramCode& program_code, const std::size_t program_size, explicit CFGRebuildState(const ProgramCode& program_code, const std::size_t program_size,
const u32 start) const u32 start)
: program_code{program_code}, program_size{program_size}, start{start} {} : start{start}, program_code{program_code}, program_size{program_size} {}
u32 start{}; u32 start{};
std::vector<BlockInfo> block_info{}; std::vector<BlockInfo> block_info{};

View file

@ -24,9 +24,8 @@ StagingCache::StagingCache() = default;
StagingCache::~StagingCache() = default; StagingCache::~StagingCache() = default;
SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params) SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params)
: params{params}, mipmap_sizes(params.num_levels), : params{params}, host_memory_size{params.GetHostSizeInBytes()}, gpu_addr{gpu_addr},
mipmap_offsets(params.num_levels), gpu_addr{gpu_addr}, host_memory_size{ mipmap_sizes(params.num_levels), mipmap_offsets(params.num_levels) {
params.GetHostSizeInBytes()} {
std::size_t offset = 0; std::size_t offset = 0;
for (u32 level = 0; level < params.num_levels; ++level) { for (u32 level = 0; level < params.num_levels; ++level) {
const std::size_t mipmap_size{params.GetGuestMipmapSize(level)}; const std::size_t mipmap_size{params.GetGuestMipmapSize(level)};