From c31f932afe7ea12caae6f0102b4197760ca54d71 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 10 Dec 2017 19:50:45 -0500 Subject: [PATCH] common/core: Silence initialization order warnings --- src/common/telemetry.h | 4 ++-- src/core/file_sys/ncch_container.cpp | 2 +- src/core/hle/kernel/hle_ipc.cpp | 2 +- src/core/hle/service/fs/archive.cpp | 2 +- src/core/loader/ncch.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/telemetry.h b/src/common/telemetry.h index dd6bbd7593..3694c76f24 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -53,10 +53,10 @@ template class Field : public FieldInterface { public: Field(FieldType type, std::string name, const T& value) - : type(type), name(std::move(name)), value(value) {} + : name(std::move(name)), type(type), value(value) {} Field(FieldType type, std::string name, T&& value) - : type(type), name(std::move(name)), value(std::move(value)) {} + : name(std::move(name)), type(type), value(std::move(value)) {} Field(const Field& other) : Field(other.type, other.name, other.value) {} diff --git a/src/core/file_sys/ncch_container.cpp b/src/core/file_sys/ncch_container.cpp index 56ecd8123b..5b201ef066 100644 --- a/src/core/file_sys/ncch_container.cpp +++ b/src/core/file_sys/ncch_container.cpp @@ -96,7 +96,7 @@ static bool LZSS_Decompress(const u8* compressed, u32 compressed_size, u8* decom } NCCHContainer::NCCHContainer(const std::string& filepath, u32 ncch_offset) - : filepath(filepath), ncch_offset(ncch_offset) { + : ncch_offset(ncch_offset), filepath(filepath) { file = FileUtil::IOFile(filepath, "rb"); } diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 303b898f17..9e45970d11 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -190,7 +190,7 @@ MappedBuffer& HLERequestContext::GetMappedBuffer(u32 id_from_cmdbuf) { } MappedBuffer::MappedBuffer(const Process& process, u32 descriptor, VAddr address, u32 id) - : process(&process), address(address), id(id) { + : id(id), address(address), process(&process) { IPC::MappedBufferDescInfo desc{descriptor}; size = desc.size; perms = desc.perms; diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 75b9afb67e..be6086c689 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp @@ -67,7 +67,7 @@ enum class DirectoryCommand : u32 { }; File::File(std::unique_ptr&& backend, const FileSys::Path& path) - : path(path), priority(0), backend(std::move(backend)), ServiceFramework("", 1) { + : ServiceFramework("", 1), path(path), priority(0), backend(std::move(backend)) { static const FunctionInfo functions[] = { {0x080200C2, &File::Read, "Read"}, {0x08030102, &File::Write, "Write"}, diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index 09230ae33f..ea47167480 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h @@ -19,8 +19,8 @@ namespace Loader { class AppLoader_NCCH final : public AppLoader { public: AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath) - : AppLoader(std::move(file)), filepath(filepath), base_ncch(filepath), - overlay_ncch(&base_ncch) {} + : AppLoader(std::move(file)), base_ncch(filepath), overlay_ncch(&base_ncch), + filepath(filepath) {} /** * Returns the type of the file