From b97fe26c1ceeecad994dba42587fd3981626de2a Mon Sep 17 00:00:00 2001 From: Andrew Pilley Date: Wed, 17 Jan 2024 10:24:25 -0800 Subject: [PATCH] All the changes that clang-format is triggering here. --- src/audio_core/in/audio_in.cpp | 4 +- src/audio_core/in/audio_in_system.cpp | 4 +- src/audio_core/out/audio_out.cpp | 4 +- src/audio_core/out/audio_out_system.cpp | 4 +- .../renderer/behavior/info_updater.cpp | 7 ++- .../renderer/memory/pool_mapper.cpp | 4 +- src/common/address_space.h | 3 +- src/common/concepts.h | 6 +-- src/common/expected.h | 8 ++-- src/common/intrusive_red_black_tree.h | 6 +-- src/common/multi_level_page_table.h | 8 ++-- src/common/point.h | 4 +- src/common/polyfill_ranges.h | 6 +-- src/common/tree.h | 6 +-- src/common/vector_math.h | 12 +++-- src/common/virtual_buffer.h | 4 +- src/core/arm/dynarmic/arm_dynarmic_32.cpp | 4 +- src/core/arm/dynarmic/arm_dynarmic_64.cpp | 4 +- src/core/file_sys/card_image.cpp | 4 +- src/core/file_sys/submission_package.cpp | 6 +-- src/core/file_sys/xts_archive.cpp | 8 ++-- src/core/hle/kernel/k_auto_object.h | 16 +++++-- src/core/hle/kernel/k_memory_layout.cpp | 4 +- src/core/hle/kernel/k_priority_queue.h | 48 ++++++++----------- src/core/hle/kernel/k_process.cpp | 4 +- src/core/hle/kernel/k_scoped_lock.h | 9 ++-- src/core/hle/result.h | 8 +++- src/core/hle/service/acc/acc.cpp | 4 +- src/core/hle/service/am/am.cpp | 12 ++--- src/core/hle/service/am/applet_ae.cpp | 12 ++--- src/core/hle/service/am/applet_oe.cpp | 8 ++-- .../hle/service/am/applets/applet_cabinet.cpp | 5 +- src/core/hle/service/am/applets/applets.cpp | 4 +- src/core/hle/service/aoc/aoc_u.cpp | 4 +- src/core/hle/service/audio/audin_u.cpp | 6 +-- src/core/hle/service/audio/audren_u.cpp | 4 +- src/core/hle/service/filesystem/fsp_srv.cpp | 8 ++-- src/core/hle/service/ipc_helpers.h | 4 +- src/core/hle/service/jit/jit_context.cpp | 4 +- src/core/hle/service/mii/mii.cpp | 4 +- src/core/hle/service/ro/ro.cpp | 4 +- src/core/hle/service/sm/sm.cpp | 4 +- .../time/standard_user_system_clock_core.cpp | 5 +- src/core/hle/service/vi/vi_m.cpp | 4 +- src/core/hle/service/vi/vi_s.cpp | 4 +- src/core/hle/service/vi/vi_u.cpp | 4 +- src/core/memory/cheat_engine.cpp | 4 +- src/input_common/input_poller.cpp | 4 +- src/network/packet.cpp | 4 +- .../frontend/maxwell/control_flow.cpp | 4 +- .../maxwell/structured_control_flow.cpp | 4 +- src/video_core/buffer_cache/buffer_cache.h | 4 +- src/video_core/dma_pusher.cpp | 4 +- src/video_core/engines/maxwell_3d.cpp | 5 +- src/video_core/engines/puller.cpp | 4 +- src/video_core/host1x/vic.cpp | 4 +- src/video_core/memory_manager.cpp | 4 +- src/video_core/query_cache/query_cache.h | 4 +- .../renderer_opengl/gl_compute_pipeline.cpp | 4 +- .../renderer_opengl/gl_query_cache.cpp | 5 +- .../renderer_vulkan/vk_compute_pass.cpp | 4 +- .../renderer_vulkan/vk_compute_pipeline.cpp | 4 +- .../renderer_vulkan/vk_present_manager.cpp | 4 +- .../renderer_vulkan/vk_query_cache.cpp | 7 ++- .../vk_staging_buffer_pool.cpp | 4 +- src/video_core/shader_environment.cpp | 4 +- src/video_core/textures/astc.cpp | 2 +- src/video_core/vulkan_common/vulkan_wrapper.h | 12 ++--- src/yuzu/applets/qt_web_browser.cpp | 4 +- src/yuzu/bootmanager.cpp | 4 +- src/yuzu/configuration/configure_dialog.cpp | 6 +-- .../configuration/configure_input_player.cpp | 10 ++-- src/yuzu/configuration/configure_per_game.cpp | 4 +- src/yuzu/configuration/shared_widget.cpp | 4 +- src/yuzu/game_list_worker.cpp | 4 +- src/yuzu/multiplayer/direct_connect.cpp | 4 +- src/yuzu/multiplayer/host_room.cpp | 5 +- src/yuzu/multiplayer/lobby.cpp | 5 +- 78 files changed, 228 insertions(+), 230 deletions(-) diff --git a/src/audio_core/in/audio_in.cpp b/src/audio_core/in/audio_in.cpp index df8c44d1f2..b28eb69786 100644 --- a/src/audio_core/in/audio_in.cpp +++ b/src/audio_core/in/audio_in.cpp @@ -8,8 +8,8 @@ namespace AudioCore::AudioIn { In::In(Core::System& system_, Manager& manager_, Kernel::KEvent* event_, size_t session_id_) - : manager{manager_}, parent_mutex{manager.mutex}, event{event_}, system{system_, event, - session_id_} {} + : manager{manager_}, parent_mutex{manager.mutex}, event{event_}, + system{system_, event, session_id_} {} void In::Free() { std::scoped_lock l{parent_mutex}; diff --git a/src/audio_core/in/audio_in_system.cpp b/src/audio_core/in/audio_in_system.cpp index b2dd3ef9f7..84d99877cb 100644 --- a/src/audio_core/in/audio_in_system.cpp +++ b/src/audio_core/in/audio_in_system.cpp @@ -14,8 +14,8 @@ namespace AudioCore::AudioIn { System::System(Core::System& system_, Kernel::KEvent* event_, const size_t session_id_) - : system{system_}, buffer_event{event_}, - session_id{session_id_}, session{std::make_unique(system_)} {} + : system{system_}, buffer_event{event_}, session_id{session_id_}, + session{std::make_unique(system_)} {} System::~System() { Finalize(); diff --git a/src/audio_core/out/audio_out.cpp b/src/audio_core/out/audio_out.cpp index b7ea134055..d31bced9df 100644 --- a/src/audio_core/out/audio_out.cpp +++ b/src/audio_core/out/audio_out.cpp @@ -8,8 +8,8 @@ namespace AudioCore::AudioOut { Out::Out(Core::System& system_, Manager& manager_, Kernel::KEvent* event_, size_t session_id_) - : manager{manager_}, parent_mutex{manager.mutex}, event{event_}, system{system_, event, - session_id_} {} + : manager{manager_}, parent_mutex{manager.mutex}, event{event_}, + system{system_, event, session_id_} {} void Out::Free() { std::scoped_lock l{parent_mutex}; diff --git a/src/audio_core/out/audio_out_system.cpp b/src/audio_core/out/audio_out_system.cpp index 7b3ff4e881..4c940be2d3 100644 --- a/src/audio_core/out/audio_out_system.cpp +++ b/src/audio_core/out/audio_out_system.cpp @@ -14,8 +14,8 @@ namespace AudioCore::AudioOut { System::System(Core::System& system_, Kernel::KEvent* event_, size_t session_id_) - : system{system_}, buffer_event{event_}, - session_id{session_id_}, session{std::make_unique(system_)} {} + : system{system_}, buffer_event{event_}, session_id{session_id_}, + session{std::make_unique(system_)} {} System::~System() { Finalize(); diff --git a/src/audio_core/renderer/behavior/info_updater.cpp b/src/audio_core/renderer/behavior/info_updater.cpp index 667711e17f..8d0ec124e0 100644 --- a/src/audio_core/renderer/behavior/info_updater.cpp +++ b/src/audio_core/renderer/behavior/info_updater.cpp @@ -19,10 +19,9 @@ namespace AudioCore::Renderer { InfoUpdater::InfoUpdater(std::span input_, std::span output_, const u32 process_handle_, BehaviorInfo& behaviour_) - : input{input_.data() + sizeof(UpdateDataHeader)}, - input_origin{input_}, output{output_.data() + sizeof(UpdateDataHeader)}, - output_origin{output_}, in_header{reinterpret_cast( - input_origin.data())}, + : input{input_.data() + sizeof(UpdateDataHeader)}, input_origin{input_}, + output{output_.data() + sizeof(UpdateDataHeader)}, output_origin{output_}, + in_header{reinterpret_cast(input_origin.data())}, out_header{reinterpret_cast(output_origin.data())}, expected_input_size{input_.size()}, expected_output_size{output_.size()}, process_handle{process_handle_}, behaviour{behaviour_} { diff --git a/src/audio_core/renderer/memory/pool_mapper.cpp b/src/audio_core/renderer/memory/pool_mapper.cpp index 999bb746be..0ba0950fbc 100644 --- a/src/audio_core/renderer/memory/pool_mapper.cpp +++ b/src/audio_core/renderer/memory/pool_mapper.cpp @@ -13,8 +13,8 @@ PoolMapper::PoolMapper(u32 process_handle_, bool force_map_) PoolMapper::PoolMapper(u32 process_handle_, std::span pool_infos_, u32 pool_count_, bool force_map_) - : process_handle{process_handle_}, pool_infos{pool_infos_.data()}, - pool_count{pool_count_}, force_map{force_map_} {} + : process_handle{process_handle_}, pool_infos{pool_infos_.data()}, pool_count{pool_count_}, + force_map{force_map_} {} void PoolMapper::ClearUseState(std::span pools, const u32 count) { for (u32 i = 0; i < count; i++) { diff --git a/src/common/address_space.h b/src/common/address_space.h index 8683c23c39..694bb2aed3 100644 --- a/src/common/address_space.h +++ b/src/common/address_space.h @@ -12,8 +12,7 @@ namespace Common { template -concept AddressSpaceValid = std::is_unsigned_v && sizeof(VaType) * 8 >= -AddressSpaceBits; +concept AddressSpaceValid = std::is_unsigned_v && sizeof(VaType) * 8 >= AddressSpaceBits; struct EmptyStruct {}; diff --git a/src/common/concepts.h b/src/common/concepts.h index 61df1d32a2..a9acff3e79 100644 --- a/src/common/concepts.h +++ b/src/common/concepts.h @@ -16,9 +16,9 @@ concept IsContiguousContainer = std::contiguous_iterator; // is available on all supported platforms. template concept DerivedFrom = requires { - std::is_base_of_v; - std::is_convertible_v; - }; + std::is_base_of_v; + std::is_convertible_v; +}; // TODO: Replace with std::convertible_to when libc++ implements it. template diff --git a/src/common/expected.h b/src/common/expected.h index 5fccfbcbdd..c62e43164d 100644 --- a/src/common/expected.h +++ b/src/common/expected.h @@ -598,14 +598,14 @@ public: template >* = nullptr, std::enable_if_t>* = nullptr> constexpr explicit Expected(Unexpected&& e) noexcept(std::is_nothrow_constructible_v) - : impl_base{unexpect_t{}, std::move(e.value())}, ctor_base{ - detail::default_constructor_tag{}} {} + : impl_base{unexpect_t{}, std::move(e.value())}, + ctor_base{detail::default_constructor_tag{}} {} template >* = nullptr, std::enable_if_t>* = nullptr> constexpr Expected(Unexpected&& e) noexcept(std::is_nothrow_constructible_v) - : impl_base{unexpect_t{}, std::move(e.value())}, ctor_base{ - detail::default_constructor_tag{}} {} + : impl_base{unexpect_t{}, std::move(e.value())}, + ctor_base{detail::default_constructor_tag{}} {} template >* = nullptr> constexpr explicit Expected(unexpect_t, Args&&... args) diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index bc2940fa0a..0a5062622b 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -238,10 +238,8 @@ public: template concept HasRedBlackKeyType = requires { - { - std::is_same::value - } -> std::convertible_to; - }; + { std::is_same::value } -> std::convertible_to; +}; namespace impl { diff --git a/src/common/multi_level_page_table.h b/src/common/multi_level_page_table.h index 31f6676a06..4eefb4d5f8 100644 --- a/src/common/multi_level_page_table.h +++ b/src/common/multi_level_page_table.h @@ -25,12 +25,12 @@ public: MultiLevelPageTable(MultiLevelPageTable&& other) noexcept : address_space_bits{std::exchange(other.address_space_bits, 0)}, - first_level_bits{std::exchange(other.first_level_bits, 0)}, page_bits{std::exchange( - other.page_bits, 0)}, + first_level_bits{std::exchange(other.first_level_bits, 0)}, + page_bits{std::exchange(other.page_bits, 0)}, first_level_shift{std::exchange(other.first_level_shift, 0)}, first_level_chunk_size{std::exchange(other.first_level_chunk_size, 0)}, - first_level_map{std::move(other.first_level_map)}, base_ptr{std::exchange(other.base_ptr, - nullptr)} {} + first_level_map{std::move(other.first_level_map)}, + base_ptr{std::exchange(other.base_ptr, nullptr)} {} MultiLevelPageTable& operator=(MultiLevelPageTable&& other) noexcept { address_space_bits = std::exchange(other.address_space_bits, 0); diff --git a/src/common/point.h b/src/common/point.h index 6491856ea8..329f5a424a 100644 --- a/src/common/point.h +++ b/src/common/point.h @@ -34,12 +34,12 @@ struct Point { .y = static_cast(value op rhs.y), \ }; \ } \ - friend constexpr Point& operator compound_op(Point& lhs, const Point& rhs) noexcept { \ + friend constexpr Point& operator compound_op(Point & lhs, const Point & rhs) noexcept { \ lhs.x = static_cast(lhs.x op rhs.x); \ lhs.y = static_cast(lhs.y op rhs.y); \ return lhs; \ } \ - friend constexpr Point& operator compound_op(Point& lhs, T value) noexcept { \ + friend constexpr Point& operator compound_op(Point & lhs, T value) noexcept { \ lhs.x = static_cast(lhs.x op value); \ lhs.y = static_cast(lhs.y op value); \ return lhs; \ diff --git a/src/common/polyfill_ranges.h b/src/common/polyfill_ranges.h index 512dbcbcb7..ea542fe120 100644 --- a/src/common/polyfill_ranges.h +++ b/src/common/polyfill_ranges.h @@ -18,9 +18,9 @@ namespace ranges { template concept range = requires(T& t) { - begin(t); - end(t); - }; + begin(t); + end(t); +}; template concept input_range = range; diff --git a/src/common/tree.h b/src/common/tree.h index f4fc43de36..a260e83a32 100644 --- a/src/common/tree.h +++ b/src/common/tree.h @@ -103,9 +103,9 @@ concept IsRBEntry = CheckRBEntry::value; template concept HasRBEntry = requires(T& t, const T& ct) { - { t.GetRBEntry() } -> std::same_as&>; - { ct.GetRBEntry() } -> std::same_as&>; - }; + { t.GetRBEntry() } -> std::same_as&>; + { ct.GetRBEntry() } -> std::same_as&>; +}; template requires HasRBEntry diff --git a/src/common/vector_math.h b/src/common/vector_math.h index b4885835df..720e89f491 100644 --- a/src/common/vector_math.h +++ b/src/common/vector_math.h @@ -362,7 +362,9 @@ public: // _DEFINE_SWIZZLER2 defines a single such function, DEFINE_SWIZZLER2 defines all of them for all // component names (x<->r) and permutations (xy<->yx) #define _DEFINE_SWIZZLER2(a, b, name) \ - [[nodiscard]] constexpr Vec2 name() const { return Vec2(a, b); } + [[nodiscard]] constexpr Vec2 name() const { \ + return Vec2(a, b); \ + } #define DEFINE_SWIZZLER2(a, b, a2, b2, a3, b3, a4, b4) \ _DEFINE_SWIZZLER2(a, b, a##b); \ _DEFINE_SWIZZLER2(a, b, a2##b2); \ @@ -555,7 +557,9 @@ public: // DEFINE_SWIZZLER2_COMP2 defines two component functions for all component names (x<->r) and // permutations (xy<->yx) #define _DEFINE_SWIZZLER2(a, b, name) \ - [[nodiscard]] constexpr Vec2 name() const { return Vec2(a, b); } + [[nodiscard]] constexpr Vec2 name() const { \ + return Vec2(a, b); \ + } #define DEFINE_SWIZZLER2_COMP1(a, a2) \ _DEFINE_SWIZZLER2(a, a, a##a); \ _DEFINE_SWIZZLER2(a, a, a2##a2) @@ -580,7 +584,9 @@ public: #undef _DEFINE_SWIZZLER2 #define _DEFINE_SWIZZLER3(a, b, c, name) \ - [[nodiscard]] constexpr Vec3 name() const { return Vec3(a, b, c); } + [[nodiscard]] constexpr Vec3 name() const { \ + return Vec3(a, b, c); \ + } #define DEFINE_SWIZZLER3_COMP1(a, a2) \ _DEFINE_SWIZZLER3(a, a, a, a##a##a); \ _DEFINE_SWIZZLER3(a, a, a, a2##a2##a2) diff --git a/src/common/virtual_buffer.h b/src/common/virtual_buffer.h index 4f6e3e6e5c..a6cf25baa2 100644 --- a/src/common/virtual_buffer.h +++ b/src/common/virtual_buffer.h @@ -33,8 +33,8 @@ public: VirtualBuffer& operator=(const VirtualBuffer&) = delete; VirtualBuffer(VirtualBuffer&& other) noexcept - : alloc_size{std::exchange(other.alloc_size, 0)}, base_ptr{std::exchange(other.base_ptr), - nullptr} {} + : alloc_size{std::exchange(other.alloc_size, 0)}, + base_ptr{std::exchange(other.base_ptr), nullptr} {} VirtualBuffer& operator=(VirtualBuffer&& other) noexcept { alloc_size = std::exchange(other.alloc_size, 0); diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 36478f7224..c9df0c022e 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -16,8 +16,8 @@ using namespace Common::Literals; class DynarmicCallbacks32 : public Dynarmic::A32::UserCallbacks { public: explicit DynarmicCallbacks32(ArmDynarmic32& parent, Kernel::KProcess* process) - : m_parent{parent}, m_memory(process->GetMemory()), - m_process(process), m_debugger_enabled{parent.m_system.DebuggerEnabled()}, + : m_parent{parent}, m_memory(process->GetMemory()), m_process(process), + m_debugger_enabled{parent.m_system.DebuggerEnabled()}, m_check_memory_access{m_debugger_enabled || !Settings::values.cpuopt_ignore_memory_aborts.GetValue()} {} diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index c811c8ad56..77a0b352f1 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -16,8 +16,8 @@ using namespace Common::Literals; class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks { public: explicit DynarmicCallbacks64(ArmDynarmic64& parent, Kernel::KProcess* process) - : m_parent{parent}, m_memory(process->GetMemory()), - m_process(process), m_debugger_enabled{parent.m_system.DebuggerEnabled()}, + : m_parent{parent}, m_memory(process->GetMemory()), m_process(process), + m_debugger_enabled{parent.m_system.DebuggerEnabled()}, m_check_memory_access{m_debugger_enabled || !Settings::values.cpuopt_ignore_memory_aborts.GetValue()} {} diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 8b9a4fc5a7..3f07590baf 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -29,8 +29,8 @@ constexpr std::array partition_names{ XCI::XCI(VirtualFile file_, u64 program_id, size_t program_index) : file(std::move(file_)), program_nca_status{Loader::ResultStatus::ErrorXCIMissingProgramNCA}, - partitions(partition_names.size()), - partitions_raw(partition_names.size()), keys{Core::Crypto::KeyManager::Instance()} { + partitions(partition_names.size()), partitions_raw(partition_names.size()), + keys{Core::Crypto::KeyManager::Instance()} { const auto header_status = TryReadHeader(); if (header_status != Loader::ResultStatus::Success) { status = header_status; diff --git a/src/core/file_sys/submission_package.cpp b/src/core/file_sys/submission_package.cpp index 68e8ec22fc..59173c6170 100644 --- a/src/core/file_sys/submission_package.cpp +++ b/src/core/file_sys/submission_package.cpp @@ -19,9 +19,9 @@ namespace FileSys { NSP::NSP(VirtualFile file_, u64 title_id_, std::size_t program_index_) - : file(std::move(file_)), expected_program_id(title_id_), - program_index(program_index_), status{Loader::ResultStatus::Success}, - pfs(std::make_shared(file)), keys{Core::Crypto::KeyManager::Instance()} { + : file(std::move(file_)), expected_program_id(title_id_), program_index(program_index_), + status{Loader::ResultStatus::Success}, pfs(std::make_shared(file)), + keys{Core::Crypto::KeyManager::Instance()} { if (pfs->GetStatus() != Loader::ResultStatus::Success) { status = pfs->GetStatus(); return; diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp index ede0aa11a5..e47d3dd45a 100644 --- a/src/core/file_sys/xts_archive.cpp +++ b/src/core/file_sys/xts_archive.cpp @@ -44,8 +44,8 @@ static bool CalculateHMAC256(Destination* out, const SourceKey* key, std::size_t } NAX::NAX(VirtualFile file_) - : header(std::make_unique()), - file(std::move(file_)), keys{Core::Crypto::KeyManager::Instance()} { + : header(std::make_unique()), file(std::move(file_)), + keys{Core::Crypto::KeyManager::Instance()} { std::string path = Common::FS::SanitizePath(file->GetFullPath()); static const std::regex nax_path_regex("/registered/(000000[0-9A-F]{2})/([0-9A-F]{32})\\.nca", std::regex_constants::ECMAScript | @@ -62,8 +62,8 @@ NAX::NAX(VirtualFile file_) } NAX::NAX(VirtualFile file_, std::array nca_id) - : header(std::make_unique()), - file(std::move(file_)), keys{Core::Crypto::KeyManager::Instance()} { + : header(std::make_unique()), file(std::move(file_)), + keys{Core::Crypto::KeyManager::Instance()} { Core::Crypto::SHA256Hash hash{}; mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0); status = Parse(fmt::format("/registered/000000{:02X}/{}.nca", hash[0], diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index 8d4e0df44f..fa6e16164b 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h @@ -24,7 +24,9 @@ private: friend class ::Kernel::KClassTokenGenerator; \ static constexpr inline auto ObjectType = ::Kernel::KClassTokenGenerator::ObjectType::CLASS; \ static constexpr inline const char* const TypeName = #CLASS; \ - static constexpr inline ClassTokenType ClassToken() { return ::Kernel::ClassToken; } \ + static constexpr inline ClassTokenType ClassToken() { \ + return ::Kernel::ClassToken; \ + } \ \ public: \ YUZU_NON_COPYABLE(CLASS); \ @@ -35,9 +37,15 @@ public: constexpr ClassTokenType Token = ClassToken(); \ return TypeObj(TypeName, Token); \ } \ - static constexpr const char* GetStaticTypeName() { return TypeName; } \ - virtual TypeObj GetTypeObj() ATTRIBUTE { return GetStaticTypeObj(); } \ - virtual const char* GetTypeName() ATTRIBUTE { return GetStaticTypeName(); } \ + static constexpr const char* GetStaticTypeName() { \ + return TypeName; \ + } \ + virtual TypeObj GetTypeObj() ATTRIBUTE { \ + return GetStaticTypeObj(); \ + } \ + virtual const char* GetTypeName() ATTRIBUTE { \ + return GetStaticTypeName(); \ + } \ \ private: \ constexpr bool operator!=(const TypeObj& rhs) diff --git a/src/core/hle/kernel/k_memory_layout.cpp b/src/core/hle/kernel/k_memory_layout.cpp index bec7146688..8aec520010 100644 --- a/src/core/hle/kernel/k_memory_layout.cpp +++ b/src/core/hle/kernel/k_memory_layout.cpp @@ -128,8 +128,8 @@ KVirtualAddress KMemoryRegionTree::GetRandomAlignedRegion(size_t size, size_t al KMemoryLayout::KMemoryLayout() : m_virtual_tree{m_memory_region_allocator}, m_physical_tree{m_memory_region_allocator}, - m_virtual_linear_tree{m_memory_region_allocator}, m_physical_linear_tree{ - m_memory_region_allocator} {} + m_virtual_linear_tree{m_memory_region_allocator}, + m_physical_linear_tree{m_memory_region_allocator} {} void KMemoryLayout::InitializeLinearMemoryRegionTrees(KPhysicalAddress aligned_linear_phys_start, KVirtualAddress linear_virtual_start) { diff --git a/src/core/hle/kernel/k_priority_queue.h b/src/core/hle/kernel/k_priority_queue.h index 26677ec65c..b250700293 100644 --- a/src/core/hle/kernel/k_priority_queue.h +++ b/src/core/hle/kernel/k_priority_queue.h @@ -17,38 +17,32 @@ namespace Kernel { class KThread; template -concept KPriorityQueueAffinityMask = ! -std::is_reference_v&& requires(T& t) { - { t.GetAffinityMask() } -> Common::ConvertibleTo; - { t.SetAffinityMask(0) }; +concept KPriorityQueueAffinityMask = !std::is_reference_v && requires(T& t) { + { t.GetAffinityMask() } -> Common::ConvertibleTo; + { t.SetAffinityMask(0) }; - { t.GetAffinity(0) } -> std::same_as; - { t.SetAffinity(0, false) }; - { t.SetAll() }; - }; + { t.GetAffinity(0) } -> std::same_as; + { t.SetAffinity(0, false) }; + { t.SetAll() }; +}; template -concept KPriorityQueueMember = ! -std::is_reference_v&& requires(T& t) { - { typename T::QueueEntry() }; - { (typename T::QueueEntry()).Initialize() }; - { (typename T::QueueEntry()).SetPrev(std::addressof(t)) }; - { (typename T::QueueEntry()).SetNext(std::addressof(t)) }; - { (typename T::QueueEntry()).GetNext() } -> std::same_as; - { (typename T::QueueEntry()).GetPrev() } -> std::same_as; - { - t.GetPriorityQueueEntry(0) - } -> std::same_as; +concept KPriorityQueueMember = !std::is_reference_v && requires(T& t) { + { typename T::QueueEntry() }; + { (typename T::QueueEntry()).Initialize() }; + { (typename T::QueueEntry()).SetPrev(std::addressof(t)) }; + { (typename T::QueueEntry()).SetNext(std::addressof(t)) }; + { (typename T::QueueEntry()).GetNext() } -> std::same_as; + { (typename T::QueueEntry()).GetPrev() } -> std::same_as; + { t.GetPriorityQueueEntry(0) } -> std::same_as; - { t.GetAffinityMask() }; - { - std::remove_cvref_t() - } -> KPriorityQueueAffinityMask; + { t.GetAffinityMask() }; + { std::remove_cvref_t() } -> KPriorityQueueAffinityMask; - { t.GetActiveCore() } -> Common::ConvertibleTo; - { t.GetPriority() } -> Common::ConvertibleTo; - { t.IsDummyThread() } -> Common::ConvertibleTo; - }; + { t.GetActiveCore() } -> Common::ConvertibleTo; + { t.GetPriority() } -> Common::ConvertibleTo; + { t.IsDummyThread() } -> Common::ConvertibleTo; +}; template requires KPriorityQueueMember diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 53735a2251..87856befce 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -1141,8 +1141,8 @@ void KProcess::Switch(KProcess* cur_process, KProcess* next_process) {} KProcess::KProcess(KernelCore& kernel) : KAutoObjectWithSlabHeapAndContainer(kernel), m_page_table{kernel}, m_state_lock{kernel}, m_list_lock{kernel}, m_cond_var{kernel.System()}, m_address_arbiter{kernel.System()}, - m_handle_table{kernel}, m_dirty_memory_managers{}, - m_exclusive_monitor{}, m_memory{kernel.System()} {} + m_handle_table{kernel}, m_dirty_memory_managers{}, m_exclusive_monitor{}, + m_memory{kernel.System()} {} KProcess::~KProcess() = default; Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size, diff --git a/src/core/hle/kernel/k_scoped_lock.h b/src/core/hle/kernel/k_scoped_lock.h index 629a7d20dd..bc9830b4da 100644 --- a/src/core/hle/kernel/k_scoped_lock.h +++ b/src/core/hle/kernel/k_scoped_lock.h @@ -10,11 +10,10 @@ namespace Kernel { template -concept KLockable = ! -std::is_reference_v&& requires(T& t) { - { t.Lock() } -> std::same_as; - { t.Unlock() } -> std::same_as; - }; +concept KLockable = !std::is_reference_v && requires(T& t) { + { t.Lock() } -> std::same_as; + { t.Unlock() } -> std::same_as; +}; template requires KLockable diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 749f51f696..df05f5be19 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -432,9 +432,13 @@ constexpr inline Result __TmpCurrentResultReference = ResultSuccess; if (true) #define R_CONVERT(catch_type, convert_type) \ - R_CATCH(catch_type) { R_THROW(static_cast(convert_type)); } + R_CATCH(catch_type) { \ + R_THROW(static_cast(convert_type)); \ + } #define R_CONVERT_ALL(convert_type) \ - R_CATCH_ALL() { R_THROW(static_cast(convert_type)); } + R_CATCH_ALL() { \ + R_THROW(static_cast(convert_type)); \ + } #define R_ASSERT(res_expr) ASSERT(R_SUCCEEDED(res_expr)) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index f215536446..6dc9779bd2 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -1021,8 +1021,8 @@ void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx) Module::Interface::Interface(std::shared_ptr module_, std::shared_ptr profile_manager_, Core::System& system_, const char* name) - : ServiceFramework{system_, name}, module{std::move(module_)}, profile_manager{std::move( - profile_manager_)} {} + : ServiceFramework{system_, name}, module{std::move(module_)}, + profile_manager{std::move(profile_manager_)} {} Module::Interface::~Interface() = default; diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index a768bdc54f..a3198151d5 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1143,8 +1143,8 @@ private: }; IStorage::IStorage(Core::System& system_, std::vector&& buffer) - : ServiceFramework{system_, "IStorage"}, impl{std::make_shared( - std::move(buffer))} { + : ServiceFramework{system_, "IStorage"}, + impl{std::make_shared(std::move(buffer))} { Register(); } @@ -1964,8 +1964,8 @@ void IAppletCommonFunctions::SetCpuBoostRequestPriority(HLERequestContext& ctx) } IApplicationFunctions::IApplicationFunctions(Core::System& system_) - : ServiceFramework{system_, "IApplicationFunctions"}, service_context{system, - "IApplicationFunctions"} { + : ServiceFramework{system_, "IApplicationFunctions"}, + service_context{system, "IApplicationFunctions"} { // clang-format off static const FunctionInfo functions[] = { {1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"}, @@ -2551,8 +2551,8 @@ void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system) { } IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_) - : ServiceFramework{system_, "IHomeMenuFunctions"}, service_context{system, - "IHomeMenuFunctions"} { + : ServiceFramework{system_, "IHomeMenuFunctions"}, + service_context{system, "IHomeMenuFunctions"} { // clang-format off static const FunctionInfo functions[] = { {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"}, diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index e30e6478a9..ecfb658c7c 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp @@ -15,8 +15,8 @@ public: explicit ILibraryAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, std::shared_ptr msg_queue_, Core::System& system_) - : ServiceFramework{system_, "ILibraryAppletProxy"}, - nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} { + : ServiceFramework{system_, "ILibraryAppletProxy"}, nvnflinger{nvnflinger_}, + msg_queue{std::move(msg_queue_)} { // clang-format off static const FunctionInfo functions[] = { {0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, @@ -143,8 +143,8 @@ public: explicit ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, std::shared_ptr msg_queue_, Core::System& system_) - : ServiceFramework{system_, "ISystemAppletProxy"}, - nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} { + : ServiceFramework{system_, "ISystemAppletProxy"}, nvnflinger{nvnflinger_}, + msg_queue{std::move(msg_queue_)} { // clang-format off static const FunctionInfo functions[] = { {0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, @@ -284,8 +284,8 @@ void AppletAE::OpenLibraryAppletProxyOld(HLERequestContext& ctx) { AppletAE::AppletAE(Nvnflinger::Nvnflinger& nvnflinger_, std::shared_ptr msg_queue_, Core::System& system_) - : ServiceFramework{system_, "appletAE"}, nvnflinger{nvnflinger_}, msg_queue{ - std::move(msg_queue_)} { + : ServiceFramework{system_, "appletAE"}, nvnflinger{nvnflinger_}, + msg_queue{std::move(msg_queue_)} { // clang-format off static const FunctionInfo functions[] = { {100, &AppletAE::OpenSystemAppletProxy, "OpenSystemAppletProxy"}, diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index d6c565d854..0eeaca2d8c 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp @@ -14,8 +14,8 @@ public: explicit IApplicationProxy(Nvnflinger::Nvnflinger& nvnflinger_, std::shared_ptr msg_queue_, Core::System& system_) - : ServiceFramework{system_, "IApplicationProxy"}, - nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} { + : ServiceFramework{system_, "IApplicationProxy"}, nvnflinger{nvnflinger_}, + msg_queue{std::move(msg_queue_)} { // clang-format off static const FunctionInfo functions[] = { {0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"}, @@ -112,8 +112,8 @@ void AppletOE::OpenApplicationProxy(HLERequestContext& ctx) { AppletOE::AppletOE(Nvnflinger::Nvnflinger& nvnflinger_, std::shared_ptr msg_queue_, Core::System& system_) - : ServiceFramework{system_, "appletOE"}, nvnflinger{nvnflinger_}, msg_queue{ - std::move(msg_queue_)} { + : ServiceFramework{system_, "appletOE"}, nvnflinger{nvnflinger_}, + msg_queue{std::move(msg_queue_)} { static const FunctionInfo functions[] = { {0, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"}, }; diff --git a/src/core/hle/service/am/applets/applet_cabinet.cpp b/src/core/hle/service/am/applets/applet_cabinet.cpp index c2ff444a69..7af3b2b0de 100644 --- a/src/core/hle/service/am/applets/applet_cabinet.cpp +++ b/src/core/hle/service/am/applets/applet_cabinet.cpp @@ -17,9 +17,8 @@ namespace Service::AM::Applets { Cabinet::Cabinet(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::CabinetApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_}, service_context{ - system_, - "CabinetApplet"} { + : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_}, + service_context{system_, "CabinetApplet"} { availability_change_event = service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent"); diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index 89d5434afd..dde6a10a3a 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp @@ -31,8 +31,8 @@ namespace Service::AM::Applets { AppletDataBroker::AppletDataBroker(Core::System& system_, LibraryAppletMode applet_mode_) - : system{system_}, applet_mode{applet_mode_}, service_context{system, - "ILibraryAppletAccessor"} { + : system{system_}, applet_mode{applet_mode_}, + service_context{system, "ILibraryAppletAccessor"} { state_changed_event = service_context.CreateEvent("ILibraryAppletAccessor:StateChangedEvent"); pop_out_data_event = service_context.CreateEvent("ILibraryAppletAccessor:PopDataOutEvent"); pop_interactive_out_data_event = diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 7075ab8006..e5d318a92b 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -49,8 +49,8 @@ static std::vector AccumulateAOCTitleIDs(Core::System& system) { class IPurchaseEventManager final : public ServiceFramework { public: explicit IPurchaseEventManager(Core::System& system_) - : ServiceFramework{system_, "IPurchaseEventManager"}, service_context{ - system, "IPurchaseEventManager"} { + : ServiceFramework{system_, "IPurchaseEventManager"}, + service_context{system, "IPurchaseEventManager"} { // clang-format off static const FunctionInfo functions[] = { {0, &IPurchaseEventManager::SetDefaultDeliveryTarget, "SetDefaultDeliveryTarget"}, diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index de2aa6906a..3360697c83 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -20,9 +20,9 @@ public: explicit IAudioIn(Core::System& system_, Manager& manager, size_t session_id, const std::string& device_name, const AudioInParameter& in_params, Kernel::KProcess* handle, u64 applet_resource_user_id) - : ServiceFramework{system_, "IAudioIn"}, - service_context{system_, "IAudioIn"}, event{service_context.CreateEvent("AudioInEvent")}, - process{handle}, impl{std::make_shared(system_, manager, event, session_id)} { + : ServiceFramework{system_, "IAudioIn"}, service_context{system_, "IAudioIn"}, + event{service_context.CreateEvent("AudioInEvent")}, process{handle}, + impl{std::make_shared(system_, manager, event, session_id)} { // clang-format off static const FunctionInfo functions[] = { {0, &IAudioIn::GetAudioInState, "GetAudioInState"}, diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index bd4ca753b4..813169a513 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -419,8 +419,8 @@ private: }; AudRenU::AudRenU(Core::System& system_) - : ServiceFramework{system_, "audren:u"}, - service_context{system_, "audren:u"}, impl{std::make_unique(system_)} { + : ServiceFramework{system_, "audren:u"}, service_context{system_, "audren:u"}, + impl{std::make_unique(system_)} { // clang-format off static const FunctionInfo functions[] = { {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index a2397bec4d..57bea0edff 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -322,8 +322,8 @@ private: class IFileSystem final : public ServiceFramework { public: explicit IFileSystem(Core::System& system_, FileSys::VirtualDir backend_, SizeGetter size_) - : ServiceFramework{system_, "IFileSystem"}, backend{std::move(backend_)}, size{std::move( - size_)} { + : ServiceFramework{system_, "IFileSystem"}, backend{std::move(backend_)}, + size{std::move(size_)} { static const FunctionInfo functions[] = { {0, &IFileSystem::CreateFile, "CreateFile"}, {1, &IFileSystem::DeleteFile, "DeleteFile"}, @@ -582,8 +582,8 @@ public: explicit ISaveDataInfoReader(Core::System& system_, std::shared_ptr save_data_controller_, FileSys::SaveDataSpaceId space) - : ServiceFramework{system_, "ISaveDataInfoReader"}, save_data_controller{ - save_data_controller_} { + : ServiceFramework{system_, "ISaveDataInfoReader"}, + save_data_controller{save_data_controller_} { static const FunctionInfo functions[] = { {0, &ISaveDataInfoReader::ReadSaveDataInfo, "ReadSaveDataInfo"}, }; diff --git a/src/core/hle/service/ipc_helpers.h b/src/core/hle/service/ipc_helpers.h index 4b02872fba..97b46d5889 100644 --- a/src/core/hle/service/ipc_helpers.h +++ b/src/core/hle/service/ipc_helpers.h @@ -72,8 +72,8 @@ public: u32 num_handles_to_copy_ = 0, u32 num_objects_to_move_ = 0, Flags flags = Flags::None) : RequestHelperBase(ctx), normal_params_size(normal_params_size_), - num_handles_to_copy(num_handles_to_copy_), - num_objects_to_move(num_objects_to_move_), kernel{ctx.kernel} { + num_handles_to_copy(num_handles_to_copy_), num_objects_to_move(num_objects_to_move_), + kernel{ctx.kernel} { memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH); diff --git a/src/core/hle/service/jit/jit_context.cpp b/src/core/hle/service/jit/jit_context.cpp index 0090e8568d..8df63f9e26 100644 --- a/src/core/hle/service/jit/jit_context.cpp +++ b/src/core/hle/service/jit/jit_context.cpp @@ -40,8 +40,8 @@ class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks { public: explicit DynarmicCallbacks64(Core::Memory::Memory& memory_, std::vector& local_memory_, IntervalSet& mapped_ranges_, JITContextImpl& parent_) - : memory{memory_}, local_memory{local_memory_}, - mapped_ranges{mapped_ranges_}, parent{parent_} {} + : memory{memory_}, local_memory{local_memory_}, mapped_ranges{mapped_ranges_}, + parent{parent_} {} u8 MemoryRead8(u64 vaddr) override { return ReadMemory(vaddr); diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index c28eed9267..6395835e0c 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -20,8 +20,8 @@ class IDatabaseService final : public ServiceFramework { public: explicit IDatabaseService(Core::System& system_, std::shared_ptr mii_manager, bool is_system_) - : ServiceFramework{system_, "IDatabaseService"}, manager{mii_manager}, is_system{ - is_system_} { + : ServiceFramework{system_, "IDatabaseService"}, manager{mii_manager}, + is_system{is_system_} { // clang-format off static const FunctionInfo functions[] = { {0, &IDatabaseService::IsUpdated, "IsUpdated"}, diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cpp index f0658bb5db..9ec47233f3 100644 --- a/src/core/hle/service/ro/ro.cpp +++ b/src/core/hle/service/ro/ro.cpp @@ -556,9 +556,7 @@ class IRoInterface : public ServiceFramework { public: explicit IRoInterface(Core::System& system_, const char* name_, std::shared_ptr ro, NrrKind nrr_kind) - : ServiceFramework{system_, name_}, interface { - ro, nrr_kind - } { + : ServiceFramework{system_, name_}, interface{ro, nrr_kind} { // clang-format off static const FunctionInfo functions[] = { {0, &IRoInterface::MapManualLoadModuleMemory, "MapManualLoadModuleMemory"}, diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 1095dcf6c3..1373da17fa 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -251,8 +251,8 @@ void SM::UnregisterService(HLERequestContext& ctx) { } SM::SM(ServiceManager& service_manager_, Core::System& system_) - : ServiceFramework{system_, "sm:", 4}, - service_manager{service_manager_}, kernel{system_.Kernel()} { + : ServiceFramework{system_, "sm:", 4}, service_manager{service_manager_}, + kernel{system_.Kernel()} { RegisterHandlers({ {0, &SM::Initialize, "Initialize"}, {1, &SM::GetServiceCmif, "GetService"}, diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp index b033757ed6..b1d06dd9a5 100644 --- a/src/core/hle/service/time/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp @@ -16,9 +16,8 @@ StandardUserSystemClockCore::StandardUserSystemClockCore( : SystemClockCore(local_system_clock_core_.GetSteadyClockCore()), local_system_clock_core{local_system_clock_core_}, network_system_clock_core{network_system_clock_core_}, - auto_correction_time{SteadyClockTimePoint::GetRandom()}, service_context{ - system_, - "StandardUserSystemClockCore"} { + auto_correction_time{SteadyClockTimePoint::GetRandom()}, + service_context{system_, "StandardUserSystemClockCore"} { auto_correction_event = service_context.CreateEvent("StandardUserSystemClockCore:AutoCorrectionEvent"); } diff --git a/src/core/hle/service/vi/vi_m.cpp b/src/core/hle/service/vi/vi_m.cpp index 0f06dc2f36..7f2e2de2c8 100644 --- a/src/core/hle/service/vi/vi_m.cpp +++ b/src/core/hle/service/vi/vi_m.cpp @@ -9,8 +9,8 @@ namespace Service::VI { VI_M::VI_M(Core::System& system_, Nvnflinger::Nvnflinger& nv_flinger_, Nvnflinger::HosBinderDriverServer& hos_binder_driver_server_) - : ServiceFramework{system_, "vi:m"}, nv_flinger{nv_flinger_}, hos_binder_driver_server{ - hos_binder_driver_server_} { + : ServiceFramework{system_, "vi:m"}, nv_flinger{nv_flinger_}, + hos_binder_driver_server{hos_binder_driver_server_} { static const FunctionInfo functions[] = { {2, &VI_M::GetDisplayService, "GetDisplayService"}, {3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, diff --git a/src/core/hle/service/vi/vi_s.cpp b/src/core/hle/service/vi/vi_s.cpp index 77f7a88ff6..0e69531584 100644 --- a/src/core/hle/service/vi/vi_s.cpp +++ b/src/core/hle/service/vi/vi_s.cpp @@ -9,8 +9,8 @@ namespace Service::VI { VI_S::VI_S(Core::System& system_, Nvnflinger::Nvnflinger& nv_flinger_, Nvnflinger::HosBinderDriverServer& hos_binder_driver_server_) - : ServiceFramework{system_, "vi:s"}, nv_flinger{nv_flinger_}, hos_binder_driver_server{ - hos_binder_driver_server_} { + : ServiceFramework{system_, "vi:s"}, nv_flinger{nv_flinger_}, + hos_binder_driver_server{hos_binder_driver_server_} { static const FunctionInfo functions[] = { {1, &VI_S::GetDisplayService, "GetDisplayService"}, {3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, diff --git a/src/core/hle/service/vi/vi_u.cpp b/src/core/hle/service/vi/vi_u.cpp index 59e13c86bd..0dde652299 100644 --- a/src/core/hle/service/vi/vi_u.cpp +++ b/src/core/hle/service/vi/vi_u.cpp @@ -9,8 +9,8 @@ namespace Service::VI { VI_U::VI_U(Core::System& system_, Nvnflinger::Nvnflinger& nv_flinger_, Nvnflinger::HosBinderDriverServer& hos_binder_driver_server_) - : ServiceFramework{system_, "vi:u"}, nv_flinger{nv_flinger_}, hos_binder_driver_server{ - hos_binder_driver_server_} { + : ServiceFramework{system_, "vi:u"}, nv_flinger{nv_flinger_}, + hos_binder_driver_server{hos_binder_driver_server_} { static const FunctionInfo functions[] = { {0, &VI_U::GetDisplayService, "GetDisplayService"}, {1, nullptr, "GetDisplayServiceWithProxyNameExchange"}, diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 96fa7fa3ae..08b55ec4e0 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -184,8 +184,8 @@ std::vector TextCheatParser::Parse(std::string_view data) const { CheatEngine::CheatEngine(System& system_, std::vector cheats_, const std::array& build_id_) - : vm{std::make_unique(system_, metadata)}, - cheats(std::move(cheats_)), core_timing{system_.CoreTiming()}, system{system_} { + : vm{std::make_unique(system_, metadata)}, cheats(std::move(cheats_)), + core_timing{system_.CoreTiming()}, system{system_} { metadata.main_nso_build_id = build_id_; } diff --git a/src/input_common/input_poller.cpp b/src/input_common/input_poller.cpp index 188e862d7f..1c0d5d9ed6 100644 --- a/src/input_common/input_poller.cpp +++ b/src/input_common/input_poller.cpp @@ -148,8 +148,8 @@ public: Common::Input::AnalogProperties properties_y_, InputEngine* input_engine_) : identifier(identifier_), axis_x(axis_x_), axis_y(axis_y_), properties_x(properties_x_), - properties_y(properties_y_), - input_engine(input_engine_), invert_axis_y{input_engine_->GetEngineName() == "sdl"} { + properties_y(properties_y_), input_engine(input_engine_), + invert_axis_y{input_engine_->GetEngineName() == "sdl"} { UpdateCallback engine_callback{[this]() { OnChange(); }}; const InputIdentifier x_input_identifier{ .identifier = identifier, diff --git a/src/network/packet.cpp b/src/network/packet.cpp index 0e22f1eb4d..e7fc83ed99 100644 --- a/src/network/packet.cpp +++ b/src/network/packet.cpp @@ -14,13 +14,13 @@ namespace Network { #ifndef htonll static u64 htonll(u64 x) { - return ((1 == htonl(1)) ? (x) : ((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32)); + return ((1 == htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)); } #endif #ifndef ntohll static u64 ntohll(u64 x) { - return ((1 == ntohl(1)) ? (x) : ((uint64_t)ntohl((x)&0xFFFFFFFF) << 32) | ntohl((x) >> 32)); + return ((1 == ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)); } #endif diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index dce414cb47..e0d6315754 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp @@ -186,8 +186,8 @@ Function::Function(ObjectPool& block_pool, Location start_address) CFG::CFG(Environment& env_, ObjectPool& block_pool_, Location start_address, bool exits_to_dispatcher_) - : env{env_}, block_pool{block_pool_}, program_start{start_address}, exits_to_dispatcher{ - exits_to_dispatcher_} { + : env{env_}, block_pool{block_pool_}, program_start{start_address}, + exits_to_dispatcher{exits_to_dispatcher_} { if (exits_to_dispatcher) { dispatch_block = block_pool.Create(Block{}); dispatch_block->begin = {}; diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp index 80c90fe6ac..93538fa4cf 100644 --- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp @@ -112,8 +112,8 @@ struct Statement : ListBaseHook { Statement(SetVariable, u32 id_, Statement* op_, Statement* up_) : op{op_}, id{id_}, up{up_}, type{StatementType::SetVariable} {} Statement(SetIndirectBranchVariable, IR::Reg branch_reg_, s32 branch_offset_, Statement* up_) - : branch_offset{branch_offset_}, - branch_reg{branch_reg_}, up{up_}, type{StatementType::SetIndirectBranchVariable} {} + : branch_offset{branch_offset_}, branch_reg{branch_reg_}, up{up_}, + type{StatementType::SetIndirectBranchVariable} {} Statement(Variable, u32 id_, Statement* up_) : id{id_}, up{up_}, type{StatementType::Variable} {} Statement(IndirectBranchCond, u32 location_, Statement* up_) diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 6d1fc38873..120a7edd78 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -16,8 +16,8 @@ using Core::Memory::YUZU_PAGESIZE; template BufferCache

::BufferCache(VideoCore::RasterizerInterface& rasterizer_, Core::Memory::Memory& cpu_memory_, Runtime& runtime_) - : runtime{runtime_}, rasterizer{rasterizer_}, cpu_memory{cpu_memory_}, memory_tracker{ - rasterizer} { + : runtime{runtime_}, rasterizer{rasterizer_}, cpu_memory{cpu_memory_}, + memory_tracker{rasterizer} { // Ensure the first slot is used for the null buffer void(slot_buffers.insert(runtime, NullBufferParams{})); common_ranges.clear(); diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 58ce0d8c20..64c8abd17e 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp @@ -18,8 +18,8 @@ constexpr u32 ComputeInline = 0x6D; DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_, MemoryManager& memory_manager_, Control::ChannelState& channel_state_) - : gpu{gpu_}, system{system_}, memory_manager{memory_manager_}, puller{gpu_, memory_manager_, - *this, channel_state_} {} + : gpu{gpu_}, system{system_}, memory_manager{memory_manager_}, + puller{gpu_, memory_manager_, *this, channel_state_} {} DmaPusher::~DmaPusher() = default; diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 95ba4f76cc..0163c67533 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -25,9 +25,8 @@ constexpr u32 MacroRegistersStart = 0xE00; Maxwell3D::Maxwell3D(Core::System& system_, MemoryManager& memory_manager_) : draw_manager{std::make_unique(this)}, system{system_}, - memory_manager{memory_manager_}, macro_engine{GetMacroEngine(*this)}, upload_state{ - memory_manager, - regs.upload} { + memory_manager{memory_manager_}, macro_engine{GetMacroEngine(*this)}, + upload_state{memory_manager, regs.upload} { dirty.flags.flip(); InitializeRegisterDefaults(); execution_mask.reset(); diff --git a/src/video_core/engines/puller.cpp b/src/video_core/engines/puller.cpp index 8dd34c04ab..415bac9c98 100644 --- a/src/video_core/engines/puller.cpp +++ b/src/video_core/engines/puller.cpp @@ -21,8 +21,8 @@ namespace Tegra::Engines { Puller::Puller(GPU& gpu_, MemoryManager& memory_manager_, DmaPusher& dma_pusher_, Control::ChannelState& channel_state_) - : gpu{gpu_}, memory_manager{memory_manager_}, dma_pusher{dma_pusher_}, channel_state{ - channel_state_} {} + : gpu{gpu_}, memory_manager{memory_manager_}, dma_pusher{dma_pusher_}, + channel_state{channel_state_} {} Puller::~Puller() = default; diff --git a/src/video_core/host1x/vic.cpp b/src/video_core/host1x/vic.cpp index 2a5eba415a..78206c76ba 100644 --- a/src/video_core/host1x/vic.cpp +++ b/src/video_core/host1x/vic.cpp @@ -50,8 +50,8 @@ union VicConfig { }; Vic::Vic(Host1x& host1x_, std::shared_ptr nvdec_processor_) - : host1x(host1x_), - nvdec_processor(std::move(nvdec_processor_)), converted_frame_buffer{nullptr, av_free} {} + : host1x(host1x_), nvdec_processor(std::move(nvdec_processor_)), + converted_frame_buffer{nullptr, av_free} {} Vic::~Vic() = default; diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index d160406138..dce7034533 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -26,8 +26,8 @@ MemoryManager::MemoryManager(Core::System& system_, u64 address_space_bits_, u64 address_space_bits{address_space_bits_}, page_bits{page_bits_}, big_page_bits{big_page_bits_}, entries{}, big_entries{}, page_table{address_space_bits, address_space_bits + page_bits - 38, page_bits != big_page_bits ? page_bits : 0}, - kind_map{PTEKind::INVALID}, unique_identifier{unique_identifier_generator.fetch_add( - 1, std::memory_order_acq_rel)}, + kind_map{PTEKind::INVALID}, + unique_identifier{unique_identifier_generator.fetch_add(1, std::memory_order_acq_rel)}, accumulator{std::make_unique()} { address_space_size = 1ULL << address_space_bits; page_size = 1ULL << page_bits; diff --git a/src/video_core/query_cache/query_cache.h b/src/video_core/query_cache/query_cache.h index 94f0c44669..daf70dcbd8 100644 --- a/src/video_core/query_cache/query_cache.h +++ b/src/video_core/query_cache/query_cache.h @@ -114,8 +114,8 @@ struct QueryCacheBase::QueryCacheBaseImpl { QueryCacheBaseImpl(QueryCacheBase* owner_, VideoCore::RasterizerInterface& rasterizer_, Core::Memory::Memory& cpu_memory_, RuntimeType& runtime_, Tegra::GPU& gpu_) - : owner{owner_}, rasterizer{rasterizer_}, - cpu_memory{cpu_memory_}, runtime{runtime_}, gpu{gpu_} { + : owner{owner_}, rasterizer{rasterizer_}, cpu_memory{cpu_memory_}, runtime{runtime_}, + gpu{gpu_} { streamer_mask = 0; for (size_t i = 0; i < static_cast(QueryType::MaxQueryTypes); i++) { streamers[i] = runtime.GetStreamerInterface(static_cast(i)); diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp index d705018607..bb974bfd2b 100644 --- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp @@ -31,8 +31,8 @@ ComputePipeline::ComputePipeline(const Device& device, TextureCache& texture_cac BufferCache& buffer_cache_, ProgramManager& program_manager_, const Shader::Info& info_, std::string code, std::vector code_v, bool force_context_flush) - : texture_cache{texture_cache_}, buffer_cache{buffer_cache_}, - program_manager{program_manager_}, info{info_} { + : texture_cache{texture_cache_}, buffer_cache{buffer_cache_}, program_manager{program_manager_}, + info{info_} { switch (device.GetShaderBackend()) { case Settings::ShaderBackend::Glsl: source_program = CreateProgram(code, GL_COMPUTE_SHADER); diff --git a/src/video_core/renderer_opengl/gl_query_cache.cpp b/src/video_core/renderer_opengl/gl_query_cache.cpp index fef7360edb..c8798eca3b 100644 --- a/src/video_core/renderer_opengl/gl_query_cache.cpp +++ b/src/video_core/renderer_opengl/gl_query_cache.cpp @@ -65,9 +65,8 @@ bool QueryCache::AnyCommandQueued() const noexcept { HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr dependency_, VideoCore::QueryType type_) - : HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_}, query{ - cache.AllocateQuery( - type)} { + : HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_}, + query{cache.AllocateQuery(type)} { glBeginQuery(GetTarget(type), query.handle); } diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp index 617f92910c..6455e5eb75 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp @@ -531,8 +531,8 @@ ASTCDecoderPass::ASTCDecoderPass(const Device& device_, Scheduler& scheduler_, ASTC_PASS_DESCRIPTOR_UPDATE_TEMPLATE_ENTRY, ASTC_BANK_INFO, COMPUTE_PUSH_CONSTANT_RANGE, ASTC_DECODER_COMP_SPV), scheduler{scheduler_}, staging_buffer_pool{staging_buffer_pool_}, - compute_pass_descriptor_queue{compute_pass_descriptor_queue_}, memory_allocator{ - memory_allocator_} {} + compute_pass_descriptor_queue{compute_pass_descriptor_queue_}, + memory_allocator{memory_allocator_} {} ASTCDecoderPass::~ASTCDecoderPass() = default; diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp index 73e585c2b7..689c7d760c 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp @@ -31,8 +31,8 @@ ComputePipeline::ComputePipeline(const Device& device_, vk::PipelineCache& pipel PipelineStatistics* pipeline_statistics, VideoCore::ShaderNotify* shader_notify, const Shader::Info& info_, vk::ShaderModule spv_module_) - : device{device_}, - pipeline_cache(pipeline_cache_), guest_descriptor_queue{guest_descriptor_queue_}, info{info_}, + : device{device_}, pipeline_cache(pipeline_cache_), + guest_descriptor_queue{guest_descriptor_queue_}, info{info_}, spv_module(std::move(spv_module_)) { if (shader_notify) { shader_notify->MarkShaderBuilding(); diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp index 792ed9615a..99d3472850 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.cpp +++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp @@ -100,8 +100,8 @@ PresentManager::PresentManager(const vk::Instance& instance_, Swapchain& swapchain_, vk::SurfaceKHR& surface_) : instance{instance_}, render_window{render_window_}, device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, swapchain{swapchain_}, - surface{surface_}, blit_supported{CanBlitToSwapchain(device.GetPhysical(), - swapchain.GetImageViewFormat())}, + surface{surface_}, + blit_supported{CanBlitToSwapchain(device.GetPhysical(), swapchain.GetImageViewFormat())}, use_present_thread{Settings::values.async_presentation.GetValue()} { SetImageCount(); diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp index ad4caf6885..2d14a870b7 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp @@ -1157,10 +1157,9 @@ struct QueryCacheRuntimeImpl { Scheduler& scheduler_, StagingBufferPool& staging_pool_, ComputePassDescriptorQueue& compute_pass_descriptor_queue, DescriptorPool& descriptor_pool) - : rasterizer{rasterizer_}, cpu_memory{cpu_memory_}, - buffer_cache{buffer_cache_}, device{device_}, - memory_allocator{memory_allocator_}, scheduler{scheduler_}, staging_pool{staging_pool_}, - guest_streamer(0, runtime), + : rasterizer{rasterizer_}, cpu_memory{cpu_memory_}, buffer_cache{buffer_cache_}, + device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, + staging_pool{staging_pool_}, guest_streamer(0, runtime), sample_streamer(static_cast(QueryType::ZPassPixelCount64), runtime, rasterizer, device, scheduler, memory_allocator, compute_pass_descriptor_queue, descriptor_pool), diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 03a0b7280b..9f24741493 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp @@ -49,8 +49,8 @@ size_t GetStreamBufferSize(const Device& device) { StagingBufferPool::StagingBufferPool(const Device& device_, MemoryAllocator& memory_allocator_, Scheduler& scheduler_) : device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, - stream_buffer_size{GetStreamBufferSize(device)}, region_size{stream_buffer_size / - StagingBufferPool::NUM_SYNCS} { + stream_buffer_size{GetStreamBufferSize(device)}, + region_size{stream_buffer_size / StagingBufferPool::NUM_SYNCS} { VkBufferCreateInfo stream_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index 250fde96cc..a660691424 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp @@ -398,8 +398,8 @@ u32 GraphicsEnvironment::ReadViewportTransformState() { ComputeEnvironment::ComputeEnvironment(Tegra::Engines::KeplerCompute& kepler_compute_, Tegra::MemoryManager& gpu_memory_, GPUVAddr program_base_, u32 start_address_) - : GenericEnvironment{gpu_memory_, program_base_, start_address_}, kepler_compute{ - &kepler_compute_} { + : GenericEnvironment{gpu_memory_, program_base_, start_address_}, + kepler_compute{&kepler_compute_} { const auto& qmd{kepler_compute->launch_description}; stage = Shader::Stage::Compute; local_memory_size = qmd.local_pos_alloc + qmd.local_crs_alloc; diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index fef0be31d8..c0740ddefc 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp @@ -1588,7 +1588,7 @@ static void DecompressBlock(std::span inBuf, const u32 blockWidth, // Reverse everything for (u32 i = 0; i < 8; i++) { // Taken from http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits -#define REVERSE_BYTE(b) (((b)*0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32 +#define REVERSE_BYTE(b) (((b) * 0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32 u8 a = static_cast(REVERSE_BYTE(texelWeightData[i])); u8 b = static_cast(REVERSE_BYTE(texelWeightData[15 - i])); #undef REVERSE_BYTE diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index a0c70797f5..d8bad06e5e 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -628,8 +628,8 @@ class Image { public: explicit Image(VkImage handle_, VkDevice owner_, VmaAllocator allocator_, VmaAllocation allocation_, const DeviceDispatch& dld_) noexcept - : handle{handle_}, owner{owner_}, allocator{allocator_}, - allocation{allocation_}, dld{&dld_} {} + : handle{handle_}, owner{owner_}, allocator{allocator_}, allocation{allocation_}, + dld{&dld_} {} Image() = default; Image(const Image&) = delete; @@ -683,8 +683,8 @@ public: explicit Buffer(VkBuffer handle_, VkDevice owner_, VmaAllocator allocator_, VmaAllocation allocation_, std::span mapped_, bool is_coherent_, const DeviceDispatch& dld_) noexcept - : handle{handle_}, owner{owner_}, allocator{allocator_}, - allocation{allocation_}, mapped{mapped_}, is_coherent{is_coherent_}, dld{&dld_} {} + : handle{handle_}, owner{owner_}, allocator{allocator_}, allocation{allocation_}, + mapped{mapped_}, is_coherent{is_coherent_}, dld{&dld_} {} Buffer() = default; Buffer(const Buffer&) = delete; @@ -692,8 +692,8 @@ public: Buffer(Buffer&& rhs) noexcept : handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator}, - allocation{rhs.allocation}, mapped{rhs.mapped}, - is_coherent{rhs.is_coherent}, dld{rhs.dld} {} + allocation{rhs.allocation}, mapped{rhs.mapped}, is_coherent{rhs.is_coherent}, + dld{rhs.dld} {} Buffer& operator=(Buffer&& rhs) noexcept { Release(); diff --git a/src/yuzu/applets/qt_web_browser.cpp b/src/yuzu/applets/qt_web_browser.cpp index 34c5fd3be0..46ce3c0a4b 100644 --- a/src/yuzu/applets/qt_web_browser.cpp +++ b/src/yuzu/applets/qt_web_browser.cpp @@ -54,8 +54,8 @@ QtNXWebEngineView::QtNXWebEngineView(QWidget* parent, Core::System& system, : QWebEngineView(parent), input_subsystem{input_subsystem_}, url_interceptor(std::make_unique()), input_interpreter(std::make_unique(system)), - default_profile{QWebEngineProfile::defaultProfile()}, global_settings{ - default_profile->settings()} { + default_profile{QWebEngineProfile::defaultProfile()}, + global_settings{default_profile->settings()} { default_profile->setPersistentStoragePath(QString::fromStdString(Common::FS::PathToUTF8String( Common::FS::GetYuzuPath(Common::FS::YuzuPath::YuzuDir) / "qtwebengine"))); diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index ed57501552..41c6552bb4 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -284,8 +284,8 @@ struct NullRenderWidget : public RenderWidget { GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, std::shared_ptr input_subsystem_, Core::System& system_) - : QWidget(parent), - emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, system{system_} { + : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, + system{system_} { setWindowTitle(QStringLiteral("yuzu %1 | %2-%3") .arg(QString::fromUtf8(Common::g_build_name), QString::fromUtf8(Common::g_scm_branch), diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index aab54a1ccb..89f3564cdb 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp @@ -31,9 +31,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, InputCommon::InputSubsystem* input_subsystem, std::vector& vk_device_records, Core::System& system_, bool enable_web_config) - : QDialog(parent), ui{std::make_unique()}, - registry(registry_), system{system_}, builder{std::make_unique( - this, !system_.IsPoweredOn())}, + : QDialog(parent), ui{std::make_unique()}, registry(registry_), + system{system_}, + builder{std::make_unique(this, !system_.IsPoweredOn())}, audio_tab{std::make_unique(system_, nullptr, *builder, this)}, cpu_tab{std::make_unique(system_, nullptr, *builder, this)}, debug_tab_tab{std::make_unique(system_, this)}, diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 400917f9de..9d4deb676d 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -293,11 +293,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i InputCommon::InputSubsystem* input_subsystem_, InputProfiles* profiles_, Core::HID::HIDCore& hid_core_, bool is_powered_on_, bool debug_) - : QWidget(parent), - ui(std::make_unique()), player_index{player_index_}, debug{debug_}, - is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, profiles(profiles_), - timeout_timer(std::make_unique()), - poll_timer(std::make_unique()), bottom_row{bottom_row_}, hid_core{hid_core_} { + : QWidget(parent), ui(std::make_unique()), + player_index{player_index_}, debug{debug_}, is_powered_on{is_powered_on_}, + input_subsystem{input_subsystem_}, profiles(profiles_), + timeout_timer(std::make_unique()), poll_timer(std::make_unique()), + bottom_row{bottom_row_}, hid_core{hid_core_} { if (player_index == 0) { auto* emulated_controller_p1 = hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1); diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index b274a3321d..6022d97a91 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp @@ -43,8 +43,8 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name, std::vector& vk_device_records, Core::System& system_) - : QDialog(parent), - ui(std::make_unique()), title_id{title_id_}, system{system_}, + : QDialog(parent), ui(std::make_unique()), title_id{title_id_}, + system{system_}, builder{std::make_unique(this, !system_.IsPoweredOn())}, tab_group{std::make_shared>()} { const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 85f4f76550..c03c5fa500 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -766,8 +766,8 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati Builder::Builder(QWidget* parent_, bool runtime_lock_) : translations{InitializeTranslations(parent_)}, - combobox_translations{ComboboxEnumeration(parent_)}, parent{parent_}, runtime_lock{ - runtime_lock_} {} + combobox_translations{ComboboxEnumeration(parent_)}, parent{parent_}, + runtime_lock{runtime_lock_} {} Builder::~Builder() = default; diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index dc006832e8..a8d5786487 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -233,8 +233,8 @@ GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs_, const PlayTime::PlayTimeManager& play_time_manager_, Core::System& system_) : vfs{std::move(vfs_)}, provider{provider_}, game_dirs{game_dirs_}, - compatibility_list{compatibility_list_}, play_time_manager{play_time_manager_}, system{ - system_} { + compatibility_list{compatibility_list_}, play_time_manager{play_time_manager_}, + system{system_} { // We want the game list to manage our lifetime. setAutoDelete(false); } diff --git a/src/yuzu/multiplayer/direct_connect.cpp b/src/yuzu/multiplayer/direct_connect.cpp index 74da97e218..8bb0a01884 100644 --- a/src/yuzu/multiplayer/direct_connect.cpp +++ b/src/yuzu/multiplayer/direct_connect.cpp @@ -24,8 +24,8 @@ enum class ConnectionType : u8 { TraversalServer, IP }; DirectConnectWindow::DirectConnectWindow(Core::System& system_, QWidget* parent) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui(std::make_unique()), system{system_}, room_network{ - system.GetRoomNetwork()} { + ui(std::make_unique()), system{system_}, + room_network{system.GetRoomNetwork()} { ui->setupUi(this); diff --git a/src/yuzu/multiplayer/host_room.cpp b/src/yuzu/multiplayer/host_room.cpp index ef364ee43a..bf100e6701 100644 --- a/src/yuzu/multiplayer/host_room.cpp +++ b/src/yuzu/multiplayer/host_room.cpp @@ -31,9 +31,8 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list, std::shared_ptr session, Core::System& system_) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui(std::make_unique()), - announce_multiplayer_session(session), system{system_}, room_network{ - system.GetRoomNetwork()} { + ui(std::make_unique()), announce_multiplayer_session(session), system{system_}, + room_network{system.GetRoomNetwork()} { ui->setupUi(this); // set up validation for all of the fields diff --git a/src/yuzu/multiplayer/lobby.cpp b/src/yuzu/multiplayer/lobby.cpp index 41692c05b1..3c68ad7ad5 100644 --- a/src/yuzu/multiplayer/lobby.cpp +++ b/src/yuzu/multiplayer/lobby.cpp @@ -27,9 +27,8 @@ Lobby::Lobby(QWidget* parent, QStandardItemModel* list, std::shared_ptr session, Core::System& system_) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui(std::make_unique()), - announce_multiplayer_session(session), system{system_}, room_network{ - system.GetRoomNetwork()} { + ui(std::make_unique()), announce_multiplayer_session(session), system{system_}, + room_network{system.GetRoomNetwork()} { ui->setupUi(this); // setup the watcher for background connections