VERY experimental Nintendo Switch 2 emulator
C++
Format: Run the new clang format on everything
James Roweea88c44eb871
diff --git a/src/common/bit_set.h b/src/common/bit_set.hindex 9c2e6b28c0..84e3cbe581 100644--- a/src/common/bit_set.h+++ b/src/common/bit_set.h@@ -236,7 +236,7 @@ public:IntTy m_val;};-} // Common+} // namespace Commontypedef Common::BitSet<u8> BitSet8;typedef Common::BitSet<u16> BitSet16;diff --git a/src/common/chunk_file.h b/src/common/chunk_file.hindex 5145a3657d..972ef90390 100644--- a/src/common/chunk_file.h+++ b/src/common/chunk_file.h@@ -607,8 +607,9 @@ public:u32 cookie = arbitraryNumber;Do(cookie);if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) {- LOG_ERROR(Common, "After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). "- "Aborting savestate load...",+ LOG_ERROR(Common,+ "After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). "+ "Aborting savestate load...",prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);SetError(ERROR_FAILURE);}diff --git a/src/common/color.h b/src/common/color.hindex 4ebd4f3d01..24a445daca 100644--- a/src/common/color.h+++ b/src/common/color.h@@ -256,4 +256,4 @@ inline void EncodeX24S8(u8 stencil, u8* bytes) {bytes[3] = stencil;}-} // namespace+} // namespace Colordiff --git a/src/common/file_util.cpp b/src/common/file_util.cppindex 5ab036b343..4e1d702f7a 100644--- a/src/common/file_util.cpp+++ b/src/common/file_util.cpp@@ -873,20 +873,19 @@ bool IOFile::Flush() {}bool IOFile::Resize(u64 size) {- if (!IsOpen() ||- 0 !=+ if (!IsOpen() || 0 !=#ifdef _WIN32- // ector: _chsize sucks, not 64-bit safe- // F|RES: changed to _chsize_s. i think it is 64-bit safe- _chsize_s(_fileno(m_file), size)+ // ector: _chsize sucks, not 64-bit safe+ // F|RES: changed to _chsize_s. i think it is 64-bit safe+ _chsize_s(_fileno(m_file), size)#else- // TODO: handle 64bit and growing- ftruncate(fileno(m_file), size)+ // TODO: handle 64bit and growing+ ftruncate(fileno(m_file), size)#endif- )+ )m_good = false;return m_good;}-} // namespace+} // namespace FileUtildiff --git a/src/common/file_util.h b/src/common/file_util.hindex 94adfcd7ec..630232a25d 100644--- a/src/common/file_util.h+++ b/src/common/file_util.h@@ -253,7 +253,7 @@ private:bool m_good = true;};-} // namespace+} // namespace FileUtil// To deal with Windows being dumb at unicode:template <typename T>diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cppindex ba0acfb72d..e136482b62 100644--- a/src/common/logging/backend.cpp+++ b/src/common/logging/backend.cpp@@ -132,4 +132,4 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsignedPrintColoredMessage(entry);}-}+} // namespace Logdiff --git a/src/common/logging/backend.h b/src/common/logging/backend.hindex c4fe2acbf2..70744e3e5b 100644--- a/src/common/logging/backend.h+++ b/src/common/logging/backend.h@@ -47,4 +47,4 @@ Entry CreateEntry(Class log_class, Level log_level, const char* filename, unsignconst char* function, const char* format, va_list args);void SetFilter(Filter* filter);-}+} // namespace Logdiff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cppindex 12e5bb45dc..733247b516 100644--- a/src/common/logging/filter.cpp+++ b/src/common/logging/filter.cpp@@ -94,4 +94,4 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin,bool Filter::CheckMessage(Class log_class, Level level) const {return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]);}-}+} // namespace Logdiff --git a/src/common/logging/filter.h b/src/common/logging/filter.hindex b51df61de9..16fa72642c 100644--- a/src/common/logging/filter.h+++ b/src/common/logging/filter.h@@ -50,4 +50,4 @@ public:private:std::array<Level, (size_t)Class::Count> class_levels;};-}+} // namespace Logdiff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cppindex f71e748d13..e7e46c76b5 100644--- a/src/common/logging/text_formatter.cpp+++ b/src/common/logging/text_formatter.cpp@@ -129,4 +129,4 @@ void PrintColoredMessage(const Entry& entry) {#undef ESC#endif}-}+} // namespace Logdiff --git a/src/common/logging/text_formatter.h b/src/common/logging/text_formatter.hindex 749268310d..66e86d9ec4 100644--- a/src/common/logging/text_formatter.h+++ b/src/common/logging/text_formatter.h@@ -28,4 +28,4 @@ void FormatLogMessage(const Entry& entry, char* out_text, size_t text_len);void PrintMessage(const Entry& entry);/// Prints the same message as `PrintMessage`, but colored acoording to the severity level.void PrintColoredMessage(const Entry& entry);-}+} // namespace Logdiff --git a/src/common/memory_util.cpp b/src/common/memory_util.cppindex c19729b21f..759ad02cae 100644--- a/src/common/memory_util.cpp+++ b/src/common/memory_util.cpp@@ -40,11 +40,12 @@ void* AllocateExecutableMemory(size_t size, bool low) {if (low && (!map_hint))map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */#endif- void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE+ void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,+ MAP_ANON | MAP_PRIVATE#if defined(ARCHITECTURE_X64) && defined(MAP_32BIT)- | (low ? MAP_32BIT : 0)+ | (low ? MAP_32BIT : 0)#endif- ,+ ,-1, 0);#endif /* defined(_WIN32) */diff --git a/src/common/quaternion.h b/src/common/quaternion.hindex 77f626bcb4..ea39298c1f 100644--- a/src/common/quaternion.h+++ b/src/common/quaternion.h@@ -46,4 +46,4 @@ inline Quaternion<float> MakeQuaternion(const Math::Vec3<float>& axis, float angreturn {axis * std::sin(angle / 2), std::cos(angle / 2)};}-} // namspace Math+} // namespace Mathdiff --git a/src/common/scm_rev.h b/src/common/scm_rev.hindex 18aaa1735d..db0f4a947e 100644--- a/src/common/scm_rev.h+++ b/src/common/scm_rev.h@@ -12,4 +12,4 @@ extern const char g_scm_desc[];extern const char g_build_name[];extern const char g_build_date[];-} // namespace+} // namespace Commondiff --git a/src/common/scope_exit.h b/src/common/scope_exit.hindex 072ab285d4..baf1f1c9e2 100644--- a/src/common/scope_exit.h+++ b/src/common/scope_exit.h@@ -22,7 +22,7 @@ template <typename Func>ScopeExitHelper<Func> ScopeExit(Func&& func) {return ScopeExitHelper<Func>(std::move(func));}-}+} // namespace detail/*** This macro allows you to conveniently specify a block of code that will run on scope exit. Handydiff --git a/src/common/string_util.cpp b/src/common/string_util.cppindex 6959915faa..e9a2a6b00e 100644--- a/src/common/string_util.cpp+++ b/src/common/string_util.cpp@@ -202,7 +202,7 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _#ifdef _WIN32":"#endif- );+ );if (std::string::npos == dir_end)dir_end = 0;else@@ -462,4 +462,4 @@ std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, size_t max_lreturn std::string(buffer, len);}-}+} // namespace Commondiff --git a/src/common/string_util.h b/src/common/string_util.hindex 259360aecb..ceb8df48e4 100644--- a/src/common/string_util.h+++ b/src/common/string_util.h@@ -134,4 +134,4 @@ bool ComparePartialString(InIt begin, InIt end, const char* other) {* NUL-terminated then the string ends at max_len characters.*/std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, size_t max_len);-}+} // namespace Commondiff --git a/src/common/thread_queue_list.h b/src/common/thread_queue_list.hindex edd0e4a3f8..38a450d693 100644--- a/src/common/thread_queue_list.h+++ b/src/common/thread_queue_list.h@@ -158,4 +158,4 @@ private:std::array<Queue, NUM_QUEUES> queues;};-} // namespace+} // namespace Commondiff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.hindex 6090d93e1c..fd3fbdd4b7 100644--- a/src/common/x64/xbyak_abi.h+++ b/src/common/x64/xbyak_abi.h@@ -60,20 +60,41 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9;const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({// GPRs- Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::r8, Xbyak::util::r9, Xbyak::util::r10,+ Xbyak::util::rcx,+ Xbyak::util::rdx,+ Xbyak::util::r8,+ Xbyak::util::r9,+ Xbyak::util::r10,Xbyak::util::r11,// XMMs- Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4,+ Xbyak::util::xmm0,+ Xbyak::util::xmm1,+ Xbyak::util::xmm2,+ Xbyak::util::xmm3,+ Xbyak::util::xmm4,Xbyak::util::xmm5,});const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({// GPRs- Xbyak::util::rbx, Xbyak::util::rsi, Xbyak::util::rdi, Xbyak::util::rbp, Xbyak::util::r12,- Xbyak::util::r13, Xbyak::util::r14, Xbyak::util::r15,+ Xbyak::util::rbx,+ Xbyak::util::rsi,+ Xbyak::util::rdi,+ Xbyak::util::rbp,+ Xbyak::util::r12,+ Xbyak::util::r13,+ Xbyak::util::r14,+ Xbyak::util::r15,// XMMs- Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9, Xbyak::util::xmm10,- Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13, Xbyak::util::xmm14,+ Xbyak::util::xmm6,+ Xbyak::util::xmm7,+ Xbyak::util::xmm8,+ Xbyak::util::xmm9,+ Xbyak::util::xmm10,+ Xbyak::util::xmm11,+ Xbyak::util::xmm12,+ Xbyak::util::xmm13,+ Xbyak::util::xmm14,Xbyak::util::xmm15,});@@ -90,18 +111,40 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx;const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({// GPRs- Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::rdi, Xbyak::util::rsi, Xbyak::util::r8,- Xbyak::util::r9, Xbyak::util::r10, Xbyak::util::r11,+ Xbyak::util::rcx,+ Xbyak::util::rdx,+ Xbyak::util::rdi,+ Xbyak::util::rsi,+ Xbyak::util::r8,+ Xbyak::util::r9,+ Xbyak::util::r10,+ Xbyak::util::r11,// XMMs- Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4,- Xbyak::util::xmm5, Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9,- Xbyak::util::xmm10, Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13,- Xbyak::util::xmm14, Xbyak::util::xmm15,+ Xbyak::util::xmm0,+ Xbyak::util::xmm1,+ Xbyak::util::xmm2,+ Xbyak::util::xmm3,+ Xbyak::util::xmm4,+ Xbyak::util::xmm5,+ Xbyak::util::xmm6,+ Xbyak::util::xmm7,+ Xbyak::util::xmm8,+ Xbyak::util::xmm9,+ Xbyak::util::xmm10,+ Xbyak::util::xmm11,+ Xbyak::util::xmm12,+ Xbyak::util::xmm13,+ Xbyak::util::xmm14,+ Xbyak::util::xmm15,});const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({// GPRs- Xbyak::util::rbx, Xbyak::util::rbp, Xbyak::util::r12, Xbyak::util::r13, Xbyak::util::r14,+ Xbyak::util::rbx,+ Xbyak::util::rbp,+ Xbyak::util::r12,+ Xbyak::util::r13,+ Xbyak::util::r14,Xbyak::util::r15,});diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cppindex 87a240d7a8..fc472b44f3 100644--- a/src/core/file_sys/archive_backend.cpp+++ b/src/core/file_sys/archive_backend.cpp@@ -119,4 +119,4 @@ std::vector<u8> Path::AsBinary() const {return {};}}-}+} // namespace FileSysdiff --git a/src/core/gdbstub/gdbstub.h b/src/core/gdbstub/gdbstub.hindex 8f12c6a1d7..201fca0957 100644--- a/src/core/gdbstub/gdbstub.h+++ b/src/core/gdbstub/gdbstub.h@@ -91,4 +91,4 @@ bool GetCpuStepFlag();* @param is_step*/void SetCpuStepFlag(bool is_step);-}+} // namespace GDBStubdiff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cppindex e386ccdc6b..038af79096 100644--- a/src/core/hle/config_mem.cpp+++ b/src/core/hle/config_mem.cpp@@ -28,4 +28,4 @@ void Init() {config_mem.firm_ctr_sdk_ver = 0x0000F297;}-} // namespace+} // namespace ConfigMemdiff --git a/src/core/hle/config_mem.h b/src/core/hle/config_mem.hindex 42fa6d789e..1840d17609 100644--- a/src/core/hle/config_mem.h+++ b/src/core/hle/config_mem.h@@ -53,4 +53,4 @@ extern ConfigMemDef config_mem;void Init();-} // namespace+} // namespace ConfigMemdiff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.hindex 1d24401b15..f902ddf2d8 100644--- a/src/core/hle/kernel/address_arbiter.h+++ b/src/core/hle/kernel/address_arbiter.h@@ -57,4 +57,4 @@ private:~AddressArbiter() override;};-} // namespace FileSys+} // namespace Kerneldiff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cppindex ce5d94e990..fb2b6f7a3c 100644--- a/src/core/hle/kernel/client_port.cpp+++ b/src/core/hle/kernel/client_port.cpp@@ -39,4 +39,4 @@ ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() {return MakeResult(std::get<SharedPtr<ClientSession>>(sessions));}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/client_port.h b/src/core/hle/kernel/client_port.hindex 8f7d6ac442..a829aeb6d0 100644--- a/src/core/hle/kernel/client_port.h+++ b/src/core/hle/kernel/client_port.h@@ -47,4 +47,4 @@ private:~ClientPort() override;};-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cppindex 646a5cc648..72773d8b19 100644--- a/src/core/hle/kernel/client_session.cpp+++ b/src/core/hle/kernel/client_session.cpp@@ -48,4 +48,4 @@ ResultCode ClientSession::SendSyncRequest(SharedPtr<Thread> thread) {return server->HandleSyncRequest(std::move(thread));}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.hindex 671174ec48..d6ab4f8930 100644--- a/src/core/hle/kernel/client_session.h+++ b/src/core/hle/kernel/client_session.h@@ -45,4 +45,4 @@ private:~ClientSession() override;};-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/condition_variable.h b/src/core/hle/kernel/condition_variable.hindex 0610a284fd..0d54031cb3 100644--- a/src/core/hle/kernel/condition_variable.h+++ b/src/core/hle/kernel/condition_variable.h@@ -4,8 +4,8 @@#pragma once-#include <queue>#include <string>+#include <queue>#include "common/common_types.h"#include "core/hle/kernel/kernel.h"#include "core/hle/kernel/wait_object.h"diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cppindex 23f9df0d63..9cae2369ff 100644--- a/src/core/hle/kernel/event.cpp+++ b/src/core/hle/kernel/event.cpp@@ -52,4 +52,4 @@ void Event::WakeupAllWaitingThreads() {signaled = false;}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.hindex cc41abb85b..e5c924a755 100644--- a/src/core/hle/kernel/event.h+++ b/src/core/hle/kernel/event.h@@ -49,4 +49,4 @@ private:~Event() override;};-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cppindex 12506e64c9..74d3d05148 100644--- a/src/core/hle/kernel/handle_table.cpp+++ b/src/core/hle/kernel/handle_table.cpp@@ -104,4 +104,4 @@ void HandleTable::Clear() {next_free_slot = 0;}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.hindex dba5573a80..935cc22b5c 100644--- a/src/core/hle/kernel/handle_table.h+++ b/src/core/hle/kernel/handle_table.h@@ -130,4 +130,4 @@ private:extern HandleTable g_handle_table;-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cppindex 3899dad096..ecf32c18af 100644--- a/src/core/hle/kernel/hle_ipc.cpp+++ b/src/core/hle/kernel/hle_ipc.cpp@@ -99,9 +99,8 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {data_payload_offset = rp.GetCurrentOffset();- if (domain_message_header &&- domain_message_header->command ==- IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) {+ if (domain_message_header && domain_message_header->command ==+ IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) {// CloseVirtualHandle command does not have SFC* or any datareturn;}diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cppindex 517dc47a8c..0149a3ed6a 100644--- a/src/core/hle/kernel/resource_limit.cpp+++ b/src/core/hle/kernel/resource_limit.cpp@@ -151,4 +151,4 @@ void ResourceLimitsInit() {void ResourceLimitsShutdown() {}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/resource_limit.h b/src/core/hle/kernel/resource_limit.hindex 42874eb8dd..1a0ca11f19 100644--- a/src/core/hle/kernel/resource_limit.h+++ b/src/core/hle/kernel/resource_limit.h@@ -123,4 +123,4 @@ void ResourceLimitsInit();// Destroys the resource limitsvoid ResourceLimitsShutdown();-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/server_port.cpp b/src/core/hle/kernel/server_port.cppindex 49a9cdfa30..0b7061403e 100644--- a/src/core/hle/kernel/server_port.cpp+++ b/src/core/hle/kernel/server_port.cpp@@ -50,4 +50,4 @@ std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortPreturn std::make_tuple(std::move(server_port), std::move(client_port));}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/server_port.h b/src/core/hle/kernel/server_port.hindex 6fe7c7f2fc..9ef4ecc35b 100644--- a/src/core/hle/kernel/server_port.h+++ b/src/core/hle/kernel/server_port.h@@ -72,4 +72,4 @@ private:~ServerPort() override;};-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.hindex f4360ddf32..6ff4ef8c11 100644--- a/src/core/hle/kernel/server_session.h+++ b/src/core/hle/kernel/server_session.h@@ -113,4 +113,4 @@ private:* in the command buffer.*/ResultCode TranslateHLERequest(ServerSession* server_session);-}+} // namespace Kerneldiff --git a/src/core/hle/kernel/session.cpp b/src/core/hle/kernel/session.cppindex 8a2a7e3fd3..6429147442 100644--- a/src/core/hle/kernel/session.cpp+++ b/src/core/hle/kernel/session.cpp@@ -9,4 +9,4 @@ namespace Kernel {Session::Session() {}Session::~Session() {}-}+} // namespace Kerneldiff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.hindex 2cf319e99e..e69b034a76 100644--- a/src/core/hle/kernel/session.h+++ b/src/core/hle/kernel/session.h@@ -24,4 +24,4 @@ public:ServerSession* server = nullptr; ///< The server endpoint of the session.SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional).};-}+} // namespace Kerneldiff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.hindex 93a6f21822..e948819c0d 100644--- a/src/core/hle/kernel/shared_memory.h+++ b/src/core/hle/kernel/shared_memory.h@@ -98,10 +98,10 @@ public:ResultCode Unmap(Process* target_process, VAddr address);/**- * Gets a pointer to the shared memory block- * @param offset Offset from the start of the shared memory block to get pointer- * @return Pointer to the shared memory block from the specified offset- */+ * Gets a pointer to the shared memory block+ * @param offset Offset from the start of the shared memory block to get pointer+ * @return Pointer to the shared memory block from the specified offset+ */u8* GetPointer(u32 offset = 0);/// Process that created this shared memory block.@@ -129,4 +129,4 @@ private:~SharedMemory() override;};-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cppindex d267b6c2ee..5163090360 100644--- a/src/core/hle/kernel/svc.cpp+++ b/src/core/hle/kernel/svc.cpp@@ -255,8 +255,9 @@ static ResultCode CancelSynchronization(Handle thread_handle) {/// Attempts to locks a mutex, creating it if it does not already existstatic ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr,Handle requesting_thread_handle) {- LOG_TRACE(Kernel_SVC, "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, "- "requesting_current_thread_handle=0x%08X",+ LOG_TRACE(Kernel_SVC,+ "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, "+ "requesting_current_thread_handle=0x%08X",holding_thread_handle, mutex_addr, requesting_thread_handle);SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle);@@ -546,8 +547,9 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, VCore::System::GetInstance().PrepareReschedule();- LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "- "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",+ LOG_TRACE(Kernel_SVC,+ "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "+ "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle);return RESULT_SUCCESS;diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cppindex a93a6c87a4..8da745634e 100644--- a/src/core/hle/kernel/timer.cpp+++ b/src/core/hle/kernel/timer.cpp@@ -111,4 +111,4 @@ void TimersInit() {void TimersShutdown() {}-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.hindex 82552372d5..82d19cefcd 100644--- a/src/core/hle/kernel/timer.h+++ b/src/core/hle/kernel/timer.h@@ -76,4 +76,4 @@ void TimersInit();/// Tears down the timer variablesvoid TimersShutdown();-} // namespace+} // namespace Kerneldiff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cppindex 687e65fe3a..b4a6ad2324 100644--- a/src/core/hle/service/am/applet_oe.cpp+++ b/src/core/hle/service/am/applet_oe.cpp@@ -222,7 +222,8 @@ public:explicit IStorageAccessor(std::vector<u8> buffer): ServiceFramework("IStorageAccessor"), buffer(std::move(buffer)) {static const FunctionInfo functions[] = {- {0, &IStorageAccessor::GetSize, "GetSize"}, {11, &IStorageAccessor::Read, "Read"},+ {0, &IStorageAccessor::GetSize, "GetSize"},+ {11, &IStorageAccessor::Read, "Read"},};RegisterHandlers(functions);}diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cppindex 66d94ff525..bf7e122888 100644--- a/src/core/hle/service/apm/apm.cpp+++ b/src/core/hle/service/apm/apm.cpp@@ -51,7 +51,8 @@ private:APM::APM() : ServiceFramework("apm") {static const FunctionInfo functions[] = {- {0x00000000, &APM::OpenSession, "OpenSession"}, {0x00000001, nullptr, "GetPerformanceMode"},+ {0x00000000, &APM::OpenSession, "OpenSession"},+ {0x00000001, nullptr, "GetPerformanceMode"},};RegisterHandlers(functions);}diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cppindex 9b73886bb4..9d3013c169 100644--- a/src/core/hle/service/nvdrv/nvdrv.cpp+++ b/src/core/hle/service/nvdrv/nvdrv.cpp@@ -7,8 +7,8 @@#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"#include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h"#include "core/hle/service/nvdrv/devices/nvmap.h"-#include "core/hle/service/nvdrv/nvdrv.h"#include "core/hle/service/nvdrv/interface.h"+#include "core/hle/service/nvdrv/nvdrv.h"namespace Service {namespace Nvidia {diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.hindex 8e1c5b3998..9c2e826da5 100644--- a/src/core/hle/service/service.h+++ b/src/core/hle/service/service.h@@ -21,7 +21,7 @@ class ClientPort;class ServerPort;class ServerSession;class HLERequestContext;-}+} // namespace Kernelnamespace Service {@@ -189,4 +189,4 @@ extern std::unordered_map<std::string, Kernel::SharedPtr<Kernel::ClientPort>> g_/// Adds a port to the named port tablevoid AddNamedPort(std::string name, Kernel::SharedPtr<Kernel::ClientPort> port);-} // namespace+} // namespace Servicediff --git a/src/core/hle/shared_page.cpp b/src/core/hle/shared_page.cppindex 9ce8af9611..bba4a07151 100644--- a/src/core/hle/shared_page.cpp+++ b/src/core/hle/shared_page.cpp@@ -82,4 +82,4 @@ void Init() {CoreTiming::ScheduleEvent(0, update_time_event);}-} // namespace+} // namespace SharedPagediff --git a/src/core/hle/shared_page.h b/src/core/hle/shared_page.hindex 864695ae14..a58259888c 100644--- a/src/core/hle/shared_page.h+++ b/src/core/hle/shared_page.h@@ -66,4 +66,4 @@ extern SharedPageDef shared_page;void Init();-} // namespace+} // namespace SharedPagediff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cppindex a751b1d62f..0db604c76d 100644--- a/src/core/hw/hw.cpp+++ b/src/core/hw/hw.cpp@@ -91,4 +91,4 @@ void Shutdown() {LCD::Shutdown();LOG_DEBUG(HW, "shutdown OK");}-}+} // namespace HWdiff --git a/src/core/hw/hw.h b/src/core/hw/hw.hindex a3c5d2ea34..5890d2b5c0 100644--- a/src/core/hw/hw.h+++ b/src/core/hw/hw.h@@ -47,4 +47,4 @@ void Init();/// Shutdown hardwarevoid Shutdown();-} // namespace+} // namespace HWdiff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cppindex 763ac1c4d8..690079b656 100644--- a/src/core/hw/lcd.cpp+++ b/src/core/hw/lcd.cpp@@ -64,4 +64,4 @@ void Shutdown() {LOG_DEBUG(HW_LCD, "shutdown OK");}-} // namespace+} // namespace LCDdiff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.hindex 191fd44af7..d2db9700f4 100644--- a/src/core/hw/lcd.h+++ b/src/core/hw/lcd.h@@ -83,4 +83,4 @@ void Init();/// Shutdown hardwarevoid Shutdown();-} // namespace+} // namespace LCDdiff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cppindex 9ba913dbeb..98fb4cdaf4 100644--- a/src/core/loader/elf.cpp+++ b/src/core/loader/elf.cpp@@ -323,8 +323,9 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) {}if (codeset_segment->size != 0) {- LOG_ERROR(Loader, "ELF has more than one segment of the same type. Skipping extra "- "segment (id %i)",+ LOG_ERROR(Loader,+ "ELF has more than one segment of the same type. Skipping extra "+ "segment (id %i)",i);continue;}diff --git a/src/core/memory_setup.h b/src/core/memory_setup.hindex ff4dcc936b..6f82a131e6 100644--- a/src/core/memory_setup.h+++ b/src/core/memory_setup.h@@ -29,4 +29,4 @@ void MapMemoryRegion(PageTable& page_table, VAddr base, u64 size, u8* target);void MapIoRegion(PageTable& page_table, VAddr base, u64 size, MMIORegionPointer mmio_handler);void UnmapRegion(PageTable& page_table, VAddr base, u64 size);-}+} // namespace Memorydiff --git a/src/core/mmio.h b/src/core/mmio.hindex f45126da8e..5e3cc01af2 100644--- a/src/core/mmio.h+++ b/src/core/mmio.h@@ -35,4 +35,4 @@ public:};using MMIORegionPointer = std::shared_ptr<MMIORegion>;-};+}; // namespace Memorydiff --git a/src/core/settings.h b/src/core/settings.hindex 56fb189ae6..6f8cd0f032 100644--- a/src/core/settings.h+++ b/src/core/settings.h@@ -100,7 +100,8 @@ enum Values {};static const std::array<const char*, NumAnalogs> mapping = {{- "lstick", "rstick",+ "lstick",+ "rstick",}};} // namespace NativeAnalogdiff --git a/src/core/tracer/citrace.h b/src/core/tracer/citrace.hindex 215f863592..21fdc127a8 100644--- a/src/core/tracer/citrace.h+++ b/src/core/tracer/citrace.h@@ -97,4 +97,4 @@ struct CTStreamElement {};#pragma pack()-}+} // namespace CiTracediff --git a/src/core/tracer/recorder.cpp b/src/core/tracer/recorder.cppindex 55b3b5efcf..f3b0d6a8fa 100644--- a/src/core/tracer/recorder.cpp+++ b/src/core/tracer/recorder.cpp@@ -205,4 +205,4 @@ template void Recorder::RegisterWritten(u32, u8);template void Recorder::RegisterWritten(u32, u16);template void Recorder::RegisterWritten(u32, u32);template void Recorder::RegisterWritten(u32, u64);-}+} // namespace CiTracediff --git a/src/core/tracer/recorder.h b/src/core/tracer/recorder.hindex 39e6ec4fd6..629c2f6d23 100644--- a/src/core/tracer/recorder.h+++ b/src/core/tracer/recorder.h@@ -63,9 +63,9 @@ private:CTStreamElement data;/**- * Extra data to store along "core" data.- * This is e.g. used for data used in MemoryUpdates.- */+ * Extra data to store along "core" data.+ * This is e.g. used for data used in MemoryUpdates.+ */std::vector<u8> extra_data;/// Optional CRC hash (e.g. for hashing memory regions)@@ -84,4 +84,4 @@ private:std::unordered_map<boost::crc_32_type::value_type /*hash*/, u32 /*file_offset*/> memory_regions;};-} // namespace+} // namespace CiTracediff --git a/src/input_common/main.cpp b/src/input_common/main.cppindex 95d40f09fe..b12623d555 100644--- a/src/input_common/main.cpp+++ b/src/input_common/main.cpp@@ -52,7 +52,8 @@ MotionEmu* GetMotionEmu() {std::string GenerateKeyboardParam(int key_code) {Common::ParamPackage param{- {"engine", "keyboard"}, {"code", std::to_string(key_code)},+ {"engine", "keyboard"},+ {"code", std::to_string(key_code)},};return param.Serialize();}diff --git a/src/tests/common/param_package.cpp b/src/tests/common/param_package.cppindex efec2cc861..19d372236c 100644--- a/src/tests/common/param_package.cpp+++ b/src/tests/common/param_package.cpp@@ -10,7 +10,9 @@ namespace Common {TEST_CASE("ParamPackage", "[common]") {ParamPackage original{- {"abc", "xyz"}, {"def", "42"}, {"jkl", "$$:1:$2$,3"},+ {"abc", "xyz"},+ {"def", "42"},+ {"jkl", "$$:1:$2$,3"},};original.Set("ghi", 3.14f);ParamPackage copy(original.Serialize());diff --git a/src/video_core/renderer_opengl/gl_shader_util.h b/src/video_core/renderer_opengl/gl_shader_util.hindex c66e8acd33..a4bcffdfa3 100644--- a/src/video_core/renderer_opengl/gl_shader_util.h+++ b/src/video_core/renderer_opengl/gl_shader_util.h@@ -16,4 +16,4 @@ namespace GLShader {*/GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader);-} // namespace+} // namespace GLShaderdiff --git a/src/video_core/utils.h b/src/video_core/utils.hindex d8567f3148..d94a10417f 100644--- a/src/video_core/utils.h+++ b/src/video_core/utils.h@@ -49,4 +49,4 @@ static inline u32 GetMortonOffset(u32 x, u32 y, u32 bytes_per_pixel) {return (i + offset) * bytes_per_pixel;}-} // namespace+} // namespace VideoCorediff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cppindex 106d625622..864691baa3 100644--- a/src/video_core/video_core.cpp+++ b/src/video_core/video_core.cpp@@ -39,4 +39,4 @@ void Shutdown() {LOG_DEBUG(Render, "shutdown OK");}-} // namespace+} // namespace VideoCorediff --git a/src/video_core/video_core.h b/src/video_core/video_core.hindex 0b87858981..1fd90b9d08 100644--- a/src/video_core/video_core.h+++ b/src/video_core/video_core.h@@ -31,4 +31,4 @@ bool Init(EmuWindow* emu_window);/// Shutdown the video corevoid Shutdown();-} // namespace+} // namespace VideoCorediff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cppindex 6a40f035ca..f9ddb9edc3 100644--- a/src/yuzu/configuration/config.cpp+++ b/src/yuzu/configuration/config.cpp@@ -26,10 +26,18 @@ const std::array<int, Settings::NativeButton::NumButtons> Config::default_buttonconst std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config::default_analogs{{{- Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, Qt::Key_E,+ Qt::Key_Up,+ Qt::Key_Down,+ Qt::Key_Left,+ Qt::Key_Right,+ Qt::Key_E,},{- Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L, Qt::Key_R,+ Qt::Key_I,+ Qt::Key_K,+ Qt::Key_J,+ Qt::Key_L,+ Qt::Key_R,},}};diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cppindex 10043e6e85..78559e2bbe 100644--- a/src/yuzu/configuration/configure_input.cpp+++ b/src/yuzu/configuration/configure_input.cpp@@ -14,7 +14,11 @@const std::array<std::string, ConfigureInput::ANALOG_SUB_BUTTONS_NUM>ConfigureInput::analog_sub_buttons{{- "up", "down", "left", "right", "modifier",+ "up",+ "down",+ "left",+ "right",+ "modifier",}};static QString getKeyName(int key_code) {@@ -36,7 +40,8 @@ static void SetAnalogButton(const Common::ParamPackage& input_param,Common::ParamPackage& analog_param, const std::string& button_name) {if (analog_param.Get("engine", "") != "analog_from_button") {analog_param = {- {"engine", "analog_from_button"}, {"modifier_scale", "0.5"},+ {"engine", "analog_from_button"},+ {"modifier_scale", "0.5"},};}analog_param.Set(button_name, input_param.Serialize());@@ -107,11 +112,17 @@ ConfigureInput::ConfigureInput(QWidget* parent)analog_map_buttons = {{{- ui->buttonLStickUp, ui->buttonLStickDown, ui->buttonLStickLeft, ui->buttonLStickRight,+ ui->buttonLStickUp,+ ui->buttonLStickDown,+ ui->buttonLStickLeft,+ ui->buttonLStickRight,ui->buttonLStickMod,},{- ui->buttonRStickUp, ui->buttonRStickDown, ui->buttonRStickLeft, ui->buttonRStickRight,+ ui->buttonRStickUp,+ ui->buttonRStickDown,+ ui->buttonRStickLeft,+ ui->buttonRStickRight,ui->buttonRStickMod,},}};diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cppindex 89e7836871..d09505a0f7 100644--- a/src/yuzu/configuration/configure_system.cpp+++ b/src/yuzu/configuration/configure_system.cpp@@ -9,7 +9,18 @@#include "yuzu/ui_settings.h"static const std::array<int, 12> days_in_month = {{- 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,+ 31,+ 29,+ 31,+ 30,+ 31,+ 30,+ 31,+ 31,+ 30,+ 31,+ 30,+ 31,}};ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) {diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.hindex 4034e909b5..e538174ebb 100644--- a/src/yuzu/debugger/wait_tree.h+++ b/src/yuzu/debugger/wait_tree.h@@ -20,7 +20,7 @@ class Mutex;class ConditionVariable;class Thread;class Timer;-}+} // namespace Kernelclass WaitTreeThread;diff --git a/src/yuzu/ui_settings.h b/src/yuzu/ui_settings.hindex d093da6411..9036ce2c19 100644--- a/src/yuzu/ui_settings.h+++ b/src/yuzu/ui_settings.h@@ -50,4 +50,4 @@ struct Values {};extern Values values;-}+} // namespace UISettingsdiff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cppindex e5be722133..bf79d2e813 100644--- a/src/yuzu_cmd/config.cpp+++ b/src/yuzu_cmd/config.cpp@@ -49,10 +49,18 @@ static const std::array<int, Settings::NativeButton::NumButtons> default_buttonsstatic const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs{{{- SDL_SCANCODE_UP, SDL_SCANCODE_DOWN, SDL_SCANCODE_LEFT, SDL_SCANCODE_RIGHT, SDL_SCANCODE_D,+ SDL_SCANCODE_UP,+ SDL_SCANCODE_DOWN,+ SDL_SCANCODE_LEFT,+ SDL_SCANCODE_RIGHT,+ SDL_SCANCODE_D,},{- SDL_SCANCODE_I, SDL_SCANCODE_K, SDL_SCANCODE_J, SDL_SCANCODE_L, SDL_SCANCODE_D,+ SDL_SCANCODE_I,+ SDL_SCANCODE_K,+ SDL_SCANCODE_J,+ SDL_SCANCODE_L,+ SDL_SCANCODE_D,},}};