From 9bf05bd68f94152dbd25ee1c6dd7342af36054c1 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 15 Apr 2024 18:53:41 +0100 Subject: [PATCH 1/5] Actions now pull from new docker images --- .github/workflows/build.yml | 2 +- .github/workflows/format.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce5945fb0..7ccd5d5b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: matrix: target: ["appimage", "fresh"] container: - image: polarzincomfrio/lime-build-environments:linux-${{ matrix.target }} + image: opensauce04/lime3ds-build:linux-${{ matrix.target }} options: -u 1001 env: CCACHE_DIR: ${{ github.workspace }}/.ccache diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 300731d53..5b3beb43c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -10,7 +10,7 @@ jobs: clang-format: runs-on: ubuntu-latest container: - image: polarzincomfrio/lime-build-environments:linux-fresh + image: opensauce04/lime3ds-build:linux-fresh options: -u 1001 steps: - uses: actions/checkout@v4 From 2906a3e6a52366b5893b6eb94d0350c0f653da78 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 15 Apr 2024 18:56:14 +0100 Subject: [PATCH 2/5] Updated clang-format command --- .ci/clang-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/clang-format.sh b/.ci/clang-format.sh index 8aa078f09..72429c453 100755 --- a/.ci/clang-format.sh +++ b/.ci/clang-format.sh @@ -7,7 +7,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis fi # Default clang-format points to default 3.5 version one -CLANG_FORMAT=clang-format-15 +CLANG_FORMAT=clang-format-18 $CLANG_FORMAT --version if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then From 5f41a173faa98d3286707700cbe96694de289b36 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 15 Apr 2024 19:03:40 +0100 Subject: [PATCH 3/5] Updated codebase formatting to be compliant with Clang 18 --- .../app/src/main/jni/camera/ndk_camera.cpp | 4 +- .../app/src/main/jni/camera/ndk_camera.h | 4 +- .../src/main/jni/camera/still_image_camera.h | 6 +- .../src/main/jni/emu_window/emu_window_gl.cpp | 4 +- .../app/src/main/jni/input_manager.cpp | 4 +- src/audio_core/hle/hle.cpp | 10 +- src/audio_core/hle/mixers.h | 10 +- src/audio_core/hle/shared_memory.h | 2 +- src/audio_core/hle/source.h | 54 ++-- src/common/expected.h | 8 +- src/common/file_util.cpp | 2 +- src/common/file_util.h | 12 +- src/common/memory_ref.h | 6 +- src/common/settings.h | 9 +- src/common/vector_math.h | 30 ++- src/core/arm/arm_interface.h | 10 +- src/core/arm/dyncom/arm_dyncom.h | 2 +- .../arm/dyncom/arm_dyncom_interpreter.cpp | 238 +++++++++--------- src/core/arm/skyeye_common/vfp/vfp_helper.h | 6 +- src/core/arm/skyeye_common/vfp/vfpdouble.cpp | 4 +- src/core/arm/skyeye_common/vfp/vfpsingle.cpp | 4 +- src/core/core.cpp | 4 +- src/core/core_timing.h | 28 +-- src/core/file_sys/archive_backend.h | 10 +- src/core/file_sys/archive_extsavedata.h | 4 +- src/core/file_sys/archive_ncch.h | 6 +- src/core/file_sys/archive_other_savedata.h | 4 +- src/core/file_sys/archive_savedata.h | 2 +- src/core/file_sys/archive_sdmc.h | 4 +- src/core/file_sys/archive_sdmcwriteonly.h | 2 +- src/core/file_sys/archive_selfncch.cpp | 4 +- src/core/file_sys/archive_selfncch.h | 12 +- .../file_sys/archive_source_sd_savedata.h | 2 +- src/core/file_sys/archive_systemsavedata.h | 2 +- src/core/file_sys/disk_archive.h | 8 +- src/core/file_sys/file_backend.h | 2 +- src/core/file_sys/ivfc_archive.h | 8 +- src/core/file_sys/layered_fs.h | 8 +- src/core/file_sys/romfs_reader.h | 14 +- src/core/file_sys/savedata_archive.h | 4 +- src/core/frontend/emu_window.h | 10 +- src/core/hle/kernel/address_arbiter.cpp | 8 +- src/core/hle/kernel/client_port.cpp | 8 +- src/core/hle/kernel/client_session.cpp | 4 +- src/core/hle/kernel/event.cpp | 8 +- src/core/hle/kernel/handle_table.cpp | 8 +- src/core/hle/kernel/hle_ipc.cpp | 22 +- src/core/hle/kernel/hle_ipc.h | 12 +- src/core/hle/kernel/ipc.cpp | 10 +- src/core/hle/kernel/kernel.cpp | 32 +-- src/core/hle/kernel/memory.cpp | 8 +- src/core/hle/kernel/mutex.cpp | 10 +- src/core/hle/kernel/object.cpp | 2 +- src/core/hle/kernel/process.cpp | 60 ++--- src/core/hle/kernel/resource_limit.cpp | 8 +- src/core/hle/kernel/semaphore.cpp | 8 +- src/core/hle/kernel/server_port.cpp | 6 +- src/core/hle/kernel/server_session.cpp | 12 +- src/core/hle/kernel/session.cpp | 6 +- src/core/hle/kernel/shared_memory.cpp | 20 +- src/core/hle/kernel/svc.cpp | 2 +- src/core/hle/kernel/thread.cpp | 42 ++-- src/core/hle/kernel/timer.cpp | 18 +- src/core/hle/kernel/vm_manager.cpp | 16 +- src/core/hle/kernel/wait_object.cpp | 2 +- src/core/hle/result.h | 2 +- src/core/hle/service/ac/ac.cpp | 14 +- src/core/hle/service/am/am.cpp | 6 +- src/core/hle/service/apt/applet_manager.h | 106 ++++---- src/core/hle/service/apt/apt.cpp | 14 +- src/core/hle/service/apt/apt.h | 2 +- src/core/hle/service/boss/boss.cpp | 12 +- src/core/hle/service/boss/online_service.cpp | 12 +- src/core/hle/service/cam/cam.cpp | 8 +- src/core/hle/service/cam/cam.h | 62 ++--- src/core/hle/service/cam/y2r_u.cpp | 12 +- src/core/hle/service/cam/y2r_u.h | 68 ++--- src/core/hle/service/cecd/cecd.cpp | 8 +- src/core/hle/service/cecd/cecd.h | 10 +- src/core/hle/service/cfg/cfg.cpp | 8 +- src/core/hle/service/csnd/csnd_snd.h | 54 ++-- src/core/hle/service/dsp/dsp_dsp.h | 10 +- src/core/hle/service/frd/frd.h | 14 +- src/core/hle/service/fs/archive.h | 6 +- src/core/hle/service/fs/directory.cpp | 4 +- src/core/hle/service/fs/file.cpp | 4 +- src/core/hle/service/fs/file.h | 8 +- src/core/hle/service/fs/fs_user.h | 4 +- src/core/hle/service/gsp/gsp_gpu.cpp | 18 +- src/core/hle/service/hid/hid.cpp | 30 +-- src/core/hle/service/http/http_c.h | 72 +++--- src/core/hle/service/ir/extra_hid.h | 4 +- src/core/hle/service/ir/ir_rst.cpp | 10 +- src/core/hle/service/ir/ir_user.cpp | 32 +-- src/core/hle/service/ldr_ro/ldr_ro.h | 2 +- src/core/hle/service/mic/mic_u.cpp | 38 +-- src/core/hle/service/ndm/ndm_u.h | 14 +- src/core/hle/service/news/news.cpp | 8 +- src/core/hle/service/news/news.h | 34 +-- src/core/hle/service/nfc/nfc.cpp | 4 +- src/core/hle/service/nfc/nfc_device.cpp | 30 +-- src/core/hle/service/nfc/nfc_types.h | 16 +- src/core/hle/service/nim/nim_u.h | 6 +- src/core/hle/service/nwm/nwm_uds.cpp | 8 +- src/core/hle/service/nwm/nwm_uds.h | 4 +- src/core/hle/service/plgldr/plgldr.cpp | 32 +-- src/core/hle/service/plgldr/plgldr.h | 10 +- src/core/hle/service/ptm/ptm.cpp | 6 +- src/core/hle/service/sm/srv.cpp | 6 +- src/core/hle/service/soc/soc_u.h | 12 +- src/core/memory.cpp | 24 +- src/core/memory.h | 4 +- src/core/movie.cpp | 16 +- .../configuration/configure_cheats.cpp | 5 +- .../graphics/graphics_breakpoints.cpp | 4 +- src/lime_qt/movie/movie_play_dialog.cpp | 4 +- src/network/packet.cpp | 4 +- src/network/room_member.h | 10 +- src/video_core/gpu.cpp | 4 +- src/video_core/pica/geometry_pipeline.cpp | 2 +- src/video_core/pica/output_vertex.h | 16 +- src/video_core/pica/packed_attribute.h | 4 +- src/video_core/pica/pica_core.cpp | 11 +- src/video_core/pica/pica_core.h | 36 +-- src/video_core/pica/primitive_assembly.h | 10 +- src/video_core/pica/regs_lcd.h | 8 +- src/video_core/pica/shader_setup.h | 22 +- src/video_core/pica/shader_unit.h | 22 +- src/video_core/pica_types.h | 2 +- .../renderer_opengl/gl_blit_helper.cpp | 8 +- .../renderer_opengl/gl_rasterizer.cpp | 16 +- .../renderer_opengl/gl_shader_manager.cpp | 4 +- .../renderer_opengl/gl_texture_runtime.cpp | 4 +- .../renderer_opengl/renderer_opengl.cpp | 5 +- .../renderer_vulkan/renderer_vulkan.cpp | 4 +- .../renderer_vulkan/vk_instance.cpp | 14 +- .../renderer_vulkan/vk_present_window.cpp | 6 +- .../renderer_vulkan/vk_rasterizer.cpp | 11 +- .../renderer_vulkan/vk_texture_runtime.cpp | 8 +- 139 files changed, 1016 insertions(+), 1015 deletions(-) diff --git a/src/android/app/src/main/jni/camera/ndk_camera.cpp b/src/android/app/src/main/jni/camera/ndk_camera.cpp index beb560fed..bf8ad18c8 100644 --- a/src/android/app/src/main/jni/camera/ndk_camera.cpp +++ b/src/android/app/src/main/jni/camera/ndk_camera.cpp @@ -42,7 +42,9 @@ struct CaptureSession final { #define MEMBER(type, name, func) \ struct type##Deleter { \ - void operator()(type* ptr) { type##_##func(ptr); } \ + void operator()(type* ptr) { \ + type##_##func(ptr); \ + } \ }; \ std::unique_ptr name diff --git a/src/android/app/src/main/jni/camera/ndk_camera.h b/src/android/app/src/main/jni/camera/ndk_camera.h index 4b9bbfdaa..3336926fd 100644 --- a/src/android/app/src/main/jni/camera/ndk_camera.h +++ b/src/android/app/src/main/jni/camera/ndk_camera.h @@ -26,9 +26,9 @@ public: void StopCapture() override; void SetResolution(const Service::CAM::Resolution& resolution) override; void SetFlip(Service::CAM::Flip flip) override; - void SetEffect(Service::CAM::Effect effect) override{}; + void SetEffect(Service::CAM::Effect effect) override {}; void SetFormat(Service::CAM::OutputFormat format) override; - void SetFrameRate(Service::CAM::FrameRate frame_rate) override{}; + void SetFrameRate(Service::CAM::FrameRate frame_rate) override {}; std::vector ReceiveFrame() override; bool IsPreviewAvailable() override; diff --git a/src/android/app/src/main/jni/camera/still_image_camera.h b/src/android/app/src/main/jni/camera/still_image_camera.h index ab12040a3..e1637d4d8 100644 --- a/src/android/app/src/main/jni/camera/still_image_camera.h +++ b/src/android/app/src/main/jni/camera/still_image_camera.h @@ -21,12 +21,12 @@ public: Interface(SharedGlobalRef path, const Service::CAM::Flip& flip); ~Interface(); void StartCapture() override; - void StopCapture() override{}; + void StopCapture() override {}; void SetResolution(const Service::CAM::Resolution& resolution) override; void SetFlip(Service::CAM::Flip flip) override; - void SetEffect(Service::CAM::Effect effect) override{}; + void SetEffect(Service::CAM::Effect effect) override {}; void SetFormat(Service::CAM::OutputFormat format) override; - void SetFrameRate(Service::CAM::FrameRate frame_rate) override{}; + void SetFrameRate(Service::CAM::FrameRate frame_rate) override {}; std::vector ReceiveFrame() override; bool IsPreviewAvailable() override; diff --git a/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp b/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp index f3bb97dc3..25db55bbe 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp @@ -40,8 +40,8 @@ class SharedContext_Android : public Frontend::GraphicsContext { public: SharedContext_Android(EGLDisplay egl_display, EGLConfig egl_config, EGLContext egl_share_context) - : egl_display{egl_display}, egl_surface{eglCreatePbufferSurface(egl_display, egl_config, - egl_empty_attribs.data())}, + : egl_display{egl_display}, + egl_surface{eglCreatePbufferSurface(egl_display, egl_config, egl_empty_attribs.data())}, egl_context{eglCreateContext(egl_display, egl_config, egl_share_context, egl_context_attribs.data())} { ASSERT_MSG(egl_surface, "eglCreatePbufferSurface() failed!"); diff --git a/src/android/app/src/main/jni/input_manager.cpp b/src/android/app/src/main/jni/input_manager.cpp index 9c58e3527..6585ff626 100644 --- a/src/android/app/src/main/jni/input_manager.cpp +++ b/src/android/app/src/main/jni/input_manager.cpp @@ -215,8 +215,8 @@ Joystick::~Joystick() { } ButtonFactory::ButtonFactory() - : button_list{std::make_shared()}, analog_button_list{ - std::make_shared()} {} + : button_list{std::make_shared()}, + analog_button_list{std::make_shared()} {} std::unique_ptr ButtonFactory::Create(const Common::ParamPackage& params) { if (params.Has("axis")) { diff --git a/src/audio_core/hle/hle.cpp b/src/audio_core/hle/hle.cpp index 9d5277504..f0be7f2c1 100644 --- a/src/audio_core/hle/hle.cpp +++ b/src/audio_core/hle/hle.cpp @@ -98,11 +98,11 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& dsp_state; - ar& pipe_data; - ar& dsp_memory.raw_memory; - ar& sources; - ar& mixers; + ar & dsp_state; + ar & pipe_data; + ar & dsp_memory.raw_memory; + ar & sources; + ar & mixers; // interrupt_handler is reregistered when loading state from DSP_DSP } friend class boost::serialization::access; diff --git a/src/audio_core/hle/mixers.h b/src/audio_core/hle/mixers.h index 9fecfcbe2..b09654dfc 100644 --- a/src/audio_core/hle/mixers.h +++ b/src/audio_core/hle/mixers.h @@ -57,11 +57,11 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& current_frame; - ar& state.intermediate_mixer_volume; - ar& state.aux_bus_enable; - ar& state.intermediate_mix_buffer; - ar& state.output_format; + ar & current_frame; + ar & state.intermediate_mixer_volume; + ar & state.aux_bus_enable; + ar & state.intermediate_mix_buffer; + ar & state.output_format; } friend class boost::serialization::access; }; diff --git a/src/audio_core/hle/shared_memory.h b/src/audio_core/hle/shared_memory.h index dfa9d2da1..41dc4e25c 100644 --- a/src/audio_core/hle/shared_memory.h +++ b/src/audio_core/hle/shared_memory.h @@ -60,7 +60,7 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& storage; + ar & storage; } friend class boost::serialization::access; }; diff --git a/src/audio_core/hle/source.h b/src/audio_core/hle/source.h index d7114952b..d9abf4ed2 100644 --- a/src/audio_core/hle/source.h +++ b/src/audio_core/hle/source.h @@ -93,18 +93,18 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& physical_address; - ar& length; - ar& adpcm_ps; - ar& adpcm_yn; - ar& adpcm_dirty; - ar& is_looping; - ar& buffer_id; - ar& mono_or_stereo; - ar& format; - ar& from_queue; - ar& play_position; - ar& has_played; + ar & physical_address; + ar & length; + ar & adpcm_ps; + ar & adpcm_yn; + ar & adpcm_dirty; + ar & is_looping; + ar & buffer_id; + ar & mono_or_stereo; + ar & format; + ar & from_queue; + ar & play_position; + ar & has_played; } friend class boost::serialization::access; }; @@ -163,20 +163,20 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& enabled; - ar& sync_count; - ar& gain; - ar& input_queue; - ar& mono_or_stereo; - ar& format; - ar& current_sample_number; - ar& current_buffer_physical_address; - ar& current_buffer; - ar& buffer_update; - ar& current_buffer_id; - ar& adpcm_coeffs; - ar& rate_multiplier; - ar& interpolation_mode; + ar & enabled; + ar & sync_count; + ar & gain; + ar & input_queue; + ar & mono_or_stereo; + ar & format; + ar & current_sample_number; + ar & current_buffer_physical_address; + ar & current_buffer; + ar & buffer_update; + ar & current_buffer_id; + ar & adpcm_coeffs; + ar & rate_multiplier; + ar & interpolation_mode; } friend class boost::serialization::access; @@ -196,7 +196,7 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& state; + ar & state; } friend class boost::serialization::access; }; diff --git a/src/common/expected.h b/src/common/expected.h index 78b755f63..8880dbc00 100644 --- a/src/common/expected.h +++ b/src/common/expected.h @@ -599,14 +599,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/file_util.cpp b/src/common/file_util.cpp index cda752e5f..662b66f88 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -83,7 +83,7 @@ #include #ifndef S_ISDIR -#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif // This namespace has various generic functions related to files and paths. diff --git a/src/common/file_util.h b/src/common/file_util.h index 6595fead9..33324defa 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -81,11 +81,11 @@ struct FSTEntry { private: template void serialize(Archive& ar, const unsigned int) { - ar& isDirectory; - ar& size; + ar & isDirectory; + ar & size; ar& Path::make(physicalName); ar& Path::make(virtualName); - ar& children; + ar & children; } friend class boost::serialization::access; }; @@ -395,13 +395,13 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& Path::make(filename); - ar& openmode; - ar& flags; + ar & openmode; + ar & flags; u64 pos; if (Archive::is_saving::value) { pos = Tell(); } - ar& pos; + ar & pos; if (Archive::is_loading::value) { Open(); Seek(pos, SEEK_SET); diff --git a/src/common/memory_ref.h b/src/common/memory_ref.h index 389528f15..f5935bf4c 100644 --- a/src/common/memory_ref.h +++ b/src/common/memory_ref.h @@ -59,7 +59,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& data; + ar & data; } friend class boost::serialization::access; }; @@ -151,8 +151,8 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& backing_mem; - ar& offset; + ar & backing_mem; + ar & offset; Init(); } friend class boost::serialization::access; diff --git a/src/common/settings.h b/src/common/settings.h index e463ba4d7..3526d3a35 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -204,8 +204,8 @@ public: explicit Setting(const Type& default_val, const Type& min_val, const Type& max_val, const std::string& name) requires(ranged) - : value{default_val}, - default_value{default_val}, maximum{max_val}, minimum{min_val}, label{name} {} + : value{default_val}, default_value{default_val}, maximum{max_val}, minimum{min_val}, + label{name} {} /** * Returns a reference to the setting's value. @@ -449,7 +449,7 @@ struct Values { Setting allow_plugin_loader{true, "allow_plugin_loader"}; // Renderer - SwitchableSetting graphics_api { + SwitchableSetting graphics_api{ #if defined(ENABLE_OPENGL) GraphicsAPI::OpenGL, #elif defined(ENABLE_VULKAN) @@ -460,8 +460,7 @@ struct Values { // TODO: Add a null renderer backend for this, perhaps. #error "At least one renderer must be enabled." #endif - GraphicsAPI::Software, GraphicsAPI::Vulkan, "graphics_api" - }; + GraphicsAPI::Software, GraphicsAPI::Vulkan, "graphics_api"}; SwitchableSetting physical_device{0, "physical_device"}; Setting use_gles{false, "use_gles"}; Setting renderer_debug{false, "renderer_debug"}; diff --git a/src/common/vector_math.h b/src/common/vector_math.h index 536f8e169..51f33859e 100644 --- a/src/common/vector_math.h +++ b/src/common/vector_math.h @@ -49,8 +49,8 @@ class Vec2 { friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int file_version) { - ar& x; - ar& y; + ar & x; + ar & y; } public: @@ -217,9 +217,9 @@ class Vec3 { friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int file_version) { - ar& x; - ar& y; - ar& z; + ar & x; + ar & y; + ar & z; } public: @@ -396,7 +396,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); \ @@ -445,10 +447,10 @@ class Vec4 { friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int file_version) { - ar& x; - ar& y; - ar& z; - ar& w; + ar & x; + ar & y; + ar & z; + ar & w; } public: @@ -596,7 +598,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) @@ -621,7 +625,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/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 48ad88218..5723115c3 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -61,11 +61,11 @@ public: template void serialize(Archive& ar, const unsigned int file_version) { - ar& cpu_registers; - ar& fpu_registers; - ar& cpsr; - ar& fpscr; - ar& fpexc; + ar & cpu_registers; + ar & fpu_registers; + ar & cpsr; + ar & fpscr; + ar & fpexc; } }; diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h index 5b367ebc7..3fd37989a 100644 --- a/src/core/arm/dyncom/arm_dyncom.h +++ b/src/core/arm/dyncom/arm_dyncom.h @@ -30,7 +30,7 @@ public: void ClearInstructionCache() override; void InvalidateCacheRange(u32 start_address, std::size_t length) override; - void ClearExclusiveState() override{}; + void ClearExclusiveState() override {}; void SetPC(u32 pc) override; u32 GetPC() const override; diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 2d333cdaf..862c422bc 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp @@ -1627,7 +1627,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) { std::size_t ptr; LOAD_NZCVT; -DISPATCH : { +DISPATCH: { if (!cpu->NirqSig) { if (!(cpu->Cpsr & 0x80)) { goto END; @@ -1662,7 +1662,7 @@ DISPATCH : { inst_base = (arm_inst*)&trans_cache_buf[ptr]; GOTO_NEXT_INST; } -ADC_INST : { +ADC_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { adc_inst* const inst_cream = (adc_inst*)inst_base->component; @@ -1696,7 +1696,7 @@ ADC_INST : { FETCH_INST; GOTO_NEXT_INST; } -ADD_INST : { +ADD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { add_inst* const inst_cream = (add_inst*)inst_base->component; @@ -1728,7 +1728,7 @@ ADD_INST : { FETCH_INST; GOTO_NEXT_INST; } -AND_INST : { +AND_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { and_inst* const inst_cream = (and_inst*)inst_base->component; @@ -1761,7 +1761,7 @@ AND_INST : { FETCH_INST; GOTO_NEXT_INST; } -BBL_INST : { +BBL_INST: { if ((inst_base->cond == ConditionCode::AL) || CondPassed(cpu, inst_base->cond)) { bbl_inst* inst_cream = (bbl_inst*)inst_base->component; if (inst_cream->L) { @@ -1775,7 +1775,7 @@ BBL_INST : { INC_PC(sizeof(bbl_inst)); goto DISPATCH; } -BIC_INST : { +BIC_INST: { bic_inst* inst_cream = (bic_inst*)inst_base->component; if ((inst_base->cond == ConditionCode::AL) || CondPassed(cpu, inst_base->cond)) { u32 lop = RN; @@ -1805,7 +1805,7 @@ BIC_INST : { FETCH_INST; GOTO_NEXT_INST; } -BKPT_INST : { +BKPT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { bkpt_inst* const inst_cream = (bkpt_inst*)inst_base->component; LOG_DEBUG(Core_ARM11, "Breakpoint instruction hit. Immediate: {:#010X}", inst_cream->imm); @@ -1815,7 +1815,7 @@ BKPT_INST : { FETCH_INST; GOTO_NEXT_INST; } -BLX_INST : { +BLX_INST: { blx_inst* inst_cream = (blx_inst*)inst_base->component; if ((inst_base->cond == ConditionCode::AL) || CondPassed(cpu, inst_base->cond)) { unsigned int inst = inst_cream->inst; @@ -1843,7 +1843,7 @@ BLX_INST : { } BX_INST: -BXJ_INST : { +BXJ_INST: { // Note that only the 'fail' case of BXJ is emulated. This is because // the facilities for Jazelle emulation are not implemented. // @@ -1871,7 +1871,7 @@ BXJ_INST : { goto DISPATCH; } -CDP_INST : { +CDP_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { // Undefined instruction here cpu->NumInstrsToExecute = 0; @@ -1883,14 +1883,14 @@ CDP_INST : { GOTO_NEXT_INST; } -CLREX_INST : { +CLREX_INST: { cpu->UnsetExclusiveMemoryAddress(); cpu->Reg[15] += cpu->GetInstructionSize(); INC_PC(sizeof(clrex_inst)); FETCH_INST; GOTO_NEXT_INST; } -CLZ_INST : { +CLZ_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { clz_inst* inst_cream = (clz_inst*)inst_base->component; RD = clz(RM); @@ -1900,7 +1900,7 @@ CLZ_INST : { FETCH_INST; GOTO_NEXT_INST; } -CMN_INST : { +CMN_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { cmn_inst* const inst_cream = (cmn_inst*)inst_base->component; @@ -1922,7 +1922,7 @@ CMN_INST : { FETCH_INST; GOTO_NEXT_INST; } -CMP_INST : { +CMP_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { cmp_inst* const inst_cream = (cmp_inst*)inst_base->component; @@ -1944,7 +1944,7 @@ CMP_INST : { FETCH_INST; GOTO_NEXT_INST; } -CPS_INST : { +CPS_INST: { cps_inst* inst_cream = (cps_inst*)inst_base->component; u32 aif_val = 0; u32 aif_mask = 0; @@ -1975,7 +1975,7 @@ CPS_INST : { FETCH_INST; GOTO_NEXT_INST; } -CPY_INST : { +CPY_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mov_inst* inst_cream = (mov_inst*)inst_base->component; @@ -1990,7 +1990,7 @@ CPY_INST : { FETCH_INST; GOTO_NEXT_INST; } -EOR_INST : { +EOR_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { eor_inst* inst_cream = (eor_inst*)inst_base->component; @@ -2021,7 +2021,7 @@ EOR_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDC_INST : { +LDC_INST: { // Instruction not implemented // LOG_CRITICAL(Core_ARM11, "unimplemented instruction"); cpu->Reg[15] += cpu->GetInstructionSize(); @@ -2029,7 +2029,7 @@ LDC_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDM_INST : { +LDM_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2100,7 +2100,7 @@ LDM_INST : { FETCH_INST; GOTO_NEXT_INST; } -SXTH_INST : { +SXTH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sxth_inst* inst_cream = (sxth_inst*)inst_base->component; @@ -2117,7 +2117,7 @@ SXTH_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDR_INST : { +LDR_INST: { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2137,7 +2137,7 @@ LDR_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRCOND_INST : { +LDRCOND_INST: { if (CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2158,7 +2158,7 @@ LDRCOND_INST : { FETCH_INST; GOTO_NEXT_INST; } -UXTH_INST : { +UXTH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { uxth_inst* inst_cream = (uxth_inst*)inst_base->component; RD = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xffff; @@ -2168,7 +2168,7 @@ UXTH_INST : { FETCH_INST; GOTO_NEXT_INST; } -UXTAH_INST : { +UXTAH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { uxtah_inst* inst_cream = (uxtah_inst*)inst_base->component; unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xffff; @@ -2180,7 +2180,7 @@ UXTAH_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRB_INST : { +LDRB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2192,7 +2192,7 @@ LDRB_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRBT_INST : { +LDRBT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2211,7 +2211,7 @@ LDRBT_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRD_INST : { +LDRD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; // Should check if RD is even-numbered, Rd != 14, addr[0:1] == 0, (CP15_reg1_U == 1 || @@ -2231,7 +2231,7 @@ LDRD_INST : { GOTO_NEXT_INST; } -LDREX_INST : { +LDREX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int read_addr = RN; @@ -2245,7 +2245,7 @@ LDREX_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDREXB_INST : { +LDREXB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int read_addr = RN; @@ -2259,7 +2259,7 @@ LDREXB_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDREXH_INST : { +LDREXH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int read_addr = RN; @@ -2273,7 +2273,7 @@ LDREXH_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDREXD_INST : { +LDREXD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int read_addr = RN; @@ -2288,7 +2288,7 @@ LDREXD_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRH_INST : { +LDRH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2300,7 +2300,7 @@ LDRH_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRSB_INST : { +LDRSB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2315,7 +2315,7 @@ LDRSB_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRSH_INST : { +LDRSH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2331,7 +2331,7 @@ LDRSH_INST : { FETCH_INST; GOTO_NEXT_INST; } -LDRT_INST : { +LDRT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -2350,7 +2350,7 @@ LDRT_INST : { FETCH_INST; GOTO_NEXT_INST; } -MCR_INST : { +MCR_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mcr_inst* inst_cream = (mcr_inst*)inst_base->component; @@ -2368,7 +2368,7 @@ MCR_INST : { GOTO_NEXT_INST; } -MCRR_INST : { +MCRR_INST: { // Stubbed, as the MPCore doesn't have any registers that are accessible // through this instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { @@ -2385,7 +2385,7 @@ MCRR_INST : { GOTO_NEXT_INST; } -MLA_INST : { +MLA_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mla_inst* inst_cream = (mla_inst*)inst_base->component; @@ -2404,7 +2404,7 @@ MLA_INST : { FETCH_INST; GOTO_NEXT_INST; } -MOV_INST : { +MOV_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mov_inst* inst_cream = (mov_inst*)inst_base->component; @@ -2430,7 +2430,7 @@ MOV_INST : { FETCH_INST; GOTO_NEXT_INST; } -MRC_INST : { +MRC_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mrc_inst* inst_cream = (mrc_inst*)inst_base->component; @@ -2451,7 +2451,7 @@ MRC_INST : { GOTO_NEXT_INST; } -MRRC_INST : { +MRRC_INST: { // Stubbed, as the MPCore doesn't have any registers that are accessible // through this instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { @@ -2468,7 +2468,7 @@ MRRC_INST : { GOTO_NEXT_INST; } -MRS_INST : { +MRS_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mrs_inst* inst_cream = (mrs_inst*)inst_base->component; @@ -2484,7 +2484,7 @@ MRS_INST : { FETCH_INST; GOTO_NEXT_INST; } -MSR_INST : { +MSR_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { msr_inst* inst_cream = (msr_inst*)inst_base->component; const u32 UserMask = 0xf80f0200, PrivMask = 0x000001df, StateMask = 0x01000020; @@ -2527,7 +2527,7 @@ MSR_INST : { FETCH_INST; GOTO_NEXT_INST; } -MUL_INST : { +MUL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mul_inst* inst_cream = (mul_inst*)inst_base->component; @@ -2544,7 +2544,7 @@ MUL_INST : { FETCH_INST; GOTO_NEXT_INST; } -MVN_INST : { +MVN_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { mvn_inst* const inst_cream = (mvn_inst*)inst_base->component; @@ -2571,7 +2571,7 @@ MVN_INST : { FETCH_INST; GOTO_NEXT_INST; } -ORR_INST : { +ORR_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { orr_inst* const inst_cream = (orr_inst*)inst_base->component; @@ -2605,14 +2605,14 @@ ORR_INST : { GOTO_NEXT_INST; } -NOP_INST : { +NOP_INST: { cpu->Reg[15] += cpu->GetInstructionSize(); INC_PC_STUB; FETCH_INST; GOTO_NEXT_INST; } -PKHBT_INST : { +PKHBT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { pkh_inst* inst_cream = (pkh_inst*)inst_base->component; RD = (RN & 0xFFFF) | ((RM << inst_cream->imm) & 0xFFFF0000); @@ -2623,7 +2623,7 @@ PKHBT_INST : { GOTO_NEXT_INST; } -PKHTB_INST : { +PKHTB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { pkh_inst* inst_cream = (pkh_inst*)inst_base->component; int shift_imm = inst_cream->imm ? inst_cream->imm : 31; @@ -2635,7 +2635,7 @@ PKHTB_INST : { GOTO_NEXT_INST; } -PLD_INST : { +PLD_INST: { // Not implemented. PLD is a hint instruction, so it's optional. cpu->Reg[15] += cpu->GetInstructionSize(); @@ -2647,7 +2647,7 @@ PLD_INST : { QADD_INST: QDADD_INST: QDSUB_INST: -QSUB_INST : { +QSUB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; const u8 op1 = inst_cream->op1; @@ -2721,7 +2721,7 @@ QADD16_INST: QADDSUBX_INST: QSUB8_INST: QSUB16_INST: -QSUBADDX_INST : { +QSUBADDX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; const u16 rm_lo = (RM & 0xFFFF); @@ -2779,7 +2779,7 @@ QSUBADDX_INST : { REV_INST: REV16_INST: -REVSH_INST : { +REVSH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { rev_inst* const inst_cream = (rev_inst*)inst_base->component; @@ -2811,7 +2811,7 @@ REVSH_INST : { GOTO_NEXT_INST; } -RFE_INST : { +RFE_INST: { // RFE is unconditional ldst_inst* const inst_cream = (ldst_inst*)inst_base->component; @@ -2825,7 +2825,7 @@ RFE_INST : { goto DISPATCH; } -RSB_INST : { +RSB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { rsb_inst* const inst_cream = (rsb_inst*)inst_base->component; @@ -2859,7 +2859,7 @@ RSB_INST : { FETCH_INST; GOTO_NEXT_INST; } -RSC_INST : { +RSC_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { rsc_inst* const inst_cream = (rsc_inst*)inst_base->component; @@ -2899,7 +2899,7 @@ SSUB8_INST: SADD16_INST: SADDSUBX_INST: SSUBADDX_INST: -SSUB16_INST : { +SSUB16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; const u8 op2 = inst_cream->op2; @@ -3001,7 +3001,7 @@ SSUB16_INST : { GOTO_NEXT_INST; } -SBC_INST : { +SBC_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sbc_inst* const inst_cream = (sbc_inst*)inst_base->component; @@ -3036,7 +3036,7 @@ SBC_INST : { GOTO_NEXT_INST; } -SEL_INST : { +SEL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; @@ -3074,7 +3074,7 @@ SEL_INST : { GOTO_NEXT_INST; } -SETEND_INST : { +SETEND_INST: { // SETEND is unconditional setend_inst* const inst_cream = (setend_inst*)inst_base->component; const bool big_endian = (inst_cream->set_bigend == 1); @@ -3092,7 +3092,7 @@ SETEND_INST : { GOTO_NEXT_INST; } -SEV_INST : { +SEV_INST: { // Stubbed, as SEV is a hint instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { LOG_TRACE(Core_ARM11, "SEV executed."); @@ -3109,7 +3109,7 @@ SHADD16_INST: SHADDSUBX_INST: SHSUB8_INST: SHSUB16_INST: -SHSUBADDX_INST : { +SHSUBADDX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; @@ -3175,7 +3175,7 @@ SHSUBADDX_INST : { GOTO_NEXT_INST; } -SMLA_INST : { +SMLA_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smla_inst* inst_cream = (smla_inst*)inst_base->component; s32 operand1, operand2; @@ -3204,7 +3204,7 @@ SMLA_INST : { SMLAD_INST: SMLSD_INST: SMUAD_INST: -SMUSD_INST : { +SMUSD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlad_inst* const inst_cream = (smlad_inst*)inst_base->component; const u8 op2 = inst_cream->op2; @@ -3260,7 +3260,7 @@ SMUSD_INST : { GOTO_NEXT_INST; } -SMLAL_INST : { +SMLAL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { umlal_inst* inst_cream = (umlal_inst*)inst_base->component; long long int rm = RM; @@ -3288,7 +3288,7 @@ SMLAL_INST : { GOTO_NEXT_INST; } -SMLALXY_INST : { +SMLALXY_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlalxy_inst* const inst_cream = (smlalxy_inst*)inst_base->component; @@ -3317,7 +3317,7 @@ SMLALXY_INST : { GOTO_NEXT_INST; } -SMLAW_INST : { +SMLAW_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlad_inst* const inst_cream = (smlad_inst*)inst_base->component; @@ -3342,7 +3342,7 @@ SMLAW_INST : { } SMLALD_INST: -SMLSLD_INST : { +SMLSLD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlald_inst* const inst_cream = (smlald_inst*)inst_base->component; @@ -3380,7 +3380,7 @@ SMLSLD_INST : { SMMLA_INST: SMMLS_INST: -SMMUL_INST : { +SMMUL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlad_inst* const inst_cream = (smlad_inst*)inst_base->component; @@ -3413,7 +3413,7 @@ SMMUL_INST : { GOTO_NEXT_INST; } -SMUL_INST : { +SMUL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smul_inst* inst_cream = (smul_inst*)inst_base->component; u32 operand1, operand2; @@ -3433,7 +3433,7 @@ SMUL_INST : { FETCH_INST; GOTO_NEXT_INST; } -SMULL_INST : { +SMULL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { umull_inst* inst_cream = (umull_inst*)inst_base->component; s64 rm = RM; @@ -3459,7 +3459,7 @@ SMULL_INST : { GOTO_NEXT_INST; } -SMULW_INST : { +SMULW_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { smlad_inst* const inst_cream = (smlad_inst*)inst_base->component; @@ -3474,7 +3474,7 @@ SMULW_INST : { GOTO_NEXT_INST; } -SRS_INST : { +SRS_INST: { // SRS is unconditional ldst_inst* const inst_cream = (ldst_inst*)inst_base->component; @@ -3490,7 +3490,7 @@ SRS_INST : { GOTO_NEXT_INST; } -SSAT_INST : { +SSAT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ssat_inst* const inst_cream = (ssat_inst*)inst_base->component; @@ -3522,7 +3522,7 @@ SSAT_INST : { GOTO_NEXT_INST; } -SSAT16_INST : { +SSAT16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ssat_inst* const inst_cream = (ssat_inst*)inst_base->component; const u8 saturate_to = inst_cream->sat_imm; @@ -3543,7 +3543,7 @@ SSAT16_INST : { GOTO_NEXT_INST; } -STC_INST : { +STC_INST: { // Instruction not implemented // LOG_CRITICAL(Core_ARM11, "unimplemented instruction"); cpu->Reg[15] += cpu->GetInstructionSize(); @@ -3551,7 +3551,7 @@ STC_INST : { FETCH_INST; GOTO_NEXT_INST; } -STM_INST : { +STM_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; unsigned int inst = inst_cream->inst; @@ -3609,7 +3609,7 @@ STM_INST : { FETCH_INST; GOTO_NEXT_INST; } -SXTB_INST : { +SXTB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sxtb_inst* inst_cream = (sxtb_inst*)inst_base->component; @@ -3626,7 +3626,7 @@ SXTB_INST : { FETCH_INST; GOTO_NEXT_INST; } -STR_INST : { +STR_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3644,7 +3644,7 @@ STR_INST : { FETCH_INST; GOTO_NEXT_INST; } -UXTB_INST : { +UXTB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { uxtb_inst* inst_cream = (uxtb_inst*)inst_base->component; RD = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate) & 0xff; @@ -3654,7 +3654,7 @@ UXTB_INST : { FETCH_INST; GOTO_NEXT_INST; } -UXTAB_INST : { +UXTAB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { uxtab_inst* inst_cream = (uxtab_inst*)inst_base->component; @@ -3666,7 +3666,7 @@ UXTAB_INST : { FETCH_INST; GOTO_NEXT_INST; } -STRB_INST : { +STRB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3678,7 +3678,7 @@ STRB_INST : { FETCH_INST; GOTO_NEXT_INST; } -STRBT_INST : { +STRBT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3695,7 +3695,7 @@ STRBT_INST : { FETCH_INST; GOTO_NEXT_INST; } -STRD_INST : { +STRD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3710,7 +3710,7 @@ STRD_INST : { FETCH_INST; GOTO_NEXT_INST; } -STREX_INST : { +STREX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int write_addr = cpu->Reg[inst_cream->Rn]; @@ -3729,7 +3729,7 @@ STREX_INST : { FETCH_INST; GOTO_NEXT_INST; } -STREXB_INST : { +STREXB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int write_addr = cpu->Reg[inst_cream->Rn]; @@ -3748,7 +3748,7 @@ STREXB_INST : { FETCH_INST; GOTO_NEXT_INST; } -STREXD_INST : { +STREXD_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int write_addr = cpu->Reg[inst_cream->Rn]; @@ -3777,7 +3777,7 @@ STREXD_INST : { FETCH_INST; GOTO_NEXT_INST; } -STREXH_INST : { +STREXH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; unsigned int write_addr = cpu->Reg[inst_cream->Rn]; @@ -3796,7 +3796,7 @@ STREXH_INST : { FETCH_INST; GOTO_NEXT_INST; } -STRH_INST : { +STRH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3809,7 +3809,7 @@ STRH_INST : { FETCH_INST; GOTO_NEXT_INST; } -STRT_INST : { +STRT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ldst_inst* inst_cream = (ldst_inst*)inst_base->component; inst_cream->get_addr(cpu, inst_cream->inst, addr); @@ -3830,7 +3830,7 @@ STRT_INST : { FETCH_INST; GOTO_NEXT_INST; } -SUB_INST : { +SUB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sub_inst* const inst_cream = (sub_inst*)inst_base->component; @@ -3862,7 +3862,7 @@ SUB_INST : { FETCH_INST; GOTO_NEXT_INST; } -SWI_INST : { +SWI_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { swi_inst* const inst_cream = (swi_inst*)inst_base->component; cpu->system.GetRunningCore().GetTimer().AddTicks(num_instrs); @@ -3879,7 +3879,7 @@ SWI_INST : { FETCH_INST; GOTO_NEXT_INST; } -SWP_INST : { +SWP_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { swp_inst* inst_cream = (swp_inst*)inst_base->component; @@ -3894,7 +3894,7 @@ SWP_INST : { FETCH_INST; GOTO_NEXT_INST; } -SWPB_INST : { +SWPB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { swp_inst* inst_cream = (swp_inst*)inst_base->component; addr = RN; @@ -3907,7 +3907,7 @@ SWPB_INST : { FETCH_INST; GOTO_NEXT_INST; } -SXTAB_INST : { +SXTAB_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sxtab_inst* inst_cream = (sxtab_inst*)inst_base->component; @@ -3924,7 +3924,7 @@ SXTAB_INST : { } SXTAB16_INST: -SXTB16_INST : { +SXTB16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sxtab_inst* const inst_cream = (sxtab_inst*)inst_base->component; @@ -3955,7 +3955,7 @@ SXTB16_INST : { GOTO_NEXT_INST; } -SXTAH_INST : { +SXTAH_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sxtah_inst* inst_cream = (sxtah_inst*)inst_base->component; @@ -3970,7 +3970,7 @@ SXTAH_INST : { GOTO_NEXT_INST; } -TEQ_INST : { +TEQ_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { teq_inst* const inst_cream = (teq_inst*)inst_base->component; @@ -3991,7 +3991,7 @@ TEQ_INST : { FETCH_INST; GOTO_NEXT_INST; } -TST_INST : { +TST_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { tst_inst* const inst_cream = (tst_inst*)inst_base->component; @@ -4018,7 +4018,7 @@ UADD16_INST: UADDSUBX_INST: USUB8_INST: USUB16_INST: -USUBADDX_INST : { +USUBADDX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; @@ -4188,7 +4188,7 @@ UHADD16_INST: UHADDSUBX_INST: UHSUBADDX_INST: UHSUB8_INST: -UHSUB16_INST : { +UHSUB16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; const u32 rm_val = RM; @@ -4261,7 +4261,7 @@ UHSUB16_INST : { GOTO_NEXT_INST; } -UMAAL_INST : { +UMAAL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { umaal_inst* const inst_cream = (umaal_inst*)inst_base->component; const u64 rm = RM; @@ -4278,7 +4278,7 @@ UMAAL_INST : { FETCH_INST; GOTO_NEXT_INST; } -UMLAL_INST : { +UMLAL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { umlal_inst* inst_cream = (umlal_inst*)inst_base->component; unsigned long long int rm = RM; @@ -4300,7 +4300,7 @@ UMLAL_INST : { FETCH_INST; GOTO_NEXT_INST; } -UMULL_INST : { +UMULL_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { umull_inst* inst_cream = (umull_inst*)inst_base->component; unsigned long long int rm = RM; @@ -4319,13 +4319,13 @@ UMULL_INST : { FETCH_INST; GOTO_NEXT_INST; } -B_2_THUMB : { +B_2_THUMB: { b_2_thumb* inst_cream = (b_2_thumb*)inst_base->component; cpu->Reg[15] = cpu->Reg[15] + 4 + inst_cream->imm; INC_PC(sizeof(b_2_thumb)); goto DISPATCH; } -B_COND_THUMB : { +B_COND_THUMB: { b_cond_thumb* inst_cream = (b_cond_thumb*)inst_base->component; if (CondPassed(cpu, inst_cream->cond)) @@ -4336,7 +4336,7 @@ B_COND_THUMB : { INC_PC(sizeof(b_cond_thumb)); goto DISPATCH; } -BL_1_THUMB : { +BL_1_THUMB: { bl_1_thumb* inst_cream = (bl_1_thumb*)inst_base->component; cpu->Reg[14] = cpu->Reg[15] + 4 + inst_cream->imm; cpu->Reg[15] += cpu->GetInstructionSize(); @@ -4344,7 +4344,7 @@ BL_1_THUMB : { FETCH_INST; GOTO_NEXT_INST; } -BL_2_THUMB : { +BL_2_THUMB: { bl_2_thumb* inst_cream = (bl_2_thumb*)inst_base->component; int tmp = ((cpu->Reg[15] + 2) | 1); cpu->Reg[15] = (cpu->Reg[14] + inst_cream->imm); @@ -4352,7 +4352,7 @@ BL_2_THUMB : { INC_PC(sizeof(bl_2_thumb)); goto DISPATCH; } -BLX_1_THUMB : { +BLX_1_THUMB: { // BLX 1 for armv5t and above u32 tmp = cpu->Reg[15]; blx_1_thumb* inst_cream = (blx_1_thumb*)inst_base->component; @@ -4368,7 +4368,7 @@ UQADD16_INST: UQADDSUBX_INST: UQSUB8_INST: UQSUB16_INST: -UQSUBADDX_INST : { +UQSUBADDX_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* const inst_cream = (generic_arm_inst*)inst_base->component; @@ -4424,7 +4424,7 @@ UQSUBADDX_INST : { } USAD8_INST: -USADA8_INST : { +USADA8_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { generic_arm_inst* inst_cream = (generic_arm_inst*)inst_base->component; @@ -4455,7 +4455,7 @@ USADA8_INST : { GOTO_NEXT_INST; } -USAT_INST : { +USAT_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ssat_inst* const inst_cream = (ssat_inst*)inst_base->component; @@ -4487,7 +4487,7 @@ USAT_INST : { GOTO_NEXT_INST; } -USAT16_INST : { +USAT16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { ssat_inst* const inst_cream = (ssat_inst*)inst_base->component; const u8 saturate_to = inst_cream->sat_imm; @@ -4509,7 +4509,7 @@ USAT16_INST : { } UXTAB16_INST: -UXTB16_INST : { +UXTB16_INST: { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { uxtab_inst* const inst_cream = (uxtab_inst*)inst_base->component; @@ -4538,7 +4538,7 @@ UXTB16_INST : { GOTO_NEXT_INST; } -WFE_INST : { +WFE_INST: { // Stubbed, as WFE is a hint instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { LOG_TRACE(Core_ARM11, "WFE executed."); @@ -4550,7 +4550,7 @@ WFE_INST : { GOTO_NEXT_INST; } -WFI_INST : { +WFI_INST: { // Stubbed, as WFI is a hint instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { LOG_TRACE(Core_ARM11, "WFI executed."); @@ -4562,7 +4562,7 @@ WFI_INST : { GOTO_NEXT_INST; } -YIELD_INST : { +YIELD_INST: { // Stubbed, as YIELD is a hint instruction. if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { LOG_TRACE(Core_ARM11, "YIELD executed."); @@ -4578,12 +4578,12 @@ YIELD_INST : { #include "core/arm/skyeye_common/vfp/vfpinstr.cpp" #undef VFP_INTERPRETER_IMPL -END : { +END: { SAVE_NZCVT; cpu->NumInstrsToExecute = 0; return num_instrs; } -INIT_INST_LENGTH : { +INIT_INST_LENGTH: { cpu->NumInstrsToExecute = 0; return num_instrs; } diff --git a/src/core/arm/skyeye_common/vfp/vfp_helper.h b/src/core/arm/skyeye_common/vfp/vfp_helper.h index 53d7ae670..19d7dae56 100644 --- a/src/core/arm/skyeye_common/vfp/vfp_helper.h +++ b/src/core/arm/skyeye_common/vfp/vfp_helper.h @@ -83,7 +83,7 @@ enum : u32 { #define vfp_get_sn(inst) ((inst & 0x000f0000) >> 15 | (inst & (1 << 7)) >> 7) #define vfp_get_dn(inst) ((inst & 0x000f0000) >> 16 | (inst & (1 << 7)) >> 3) -#define vfp_single(inst) (((inst)&0x0000f00) == 0xa00) +#define vfp_single(inst) (((inst) & 0x0000f00) == 0xa00) inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift) { if (shift) { @@ -222,7 +222,7 @@ struct vfp_single { #define VFP_SINGLE_SIGNIFICAND_QNAN (1 << (VFP_SINGLE_MANTISSA_BITS - 1 + VFP_SINGLE_LOW_BITS)) // Operations on packed single-precision numbers -#define vfp_single_packed_sign(v) ((v)&0x80000000) +#define vfp_single_packed_sign(v) ((v) & 0x80000000) #define vfp_single_packed_negate(v) ((v) ^ 0x80000000) #define vfp_single_packed_abs(v) ((v) & ~0x80000000) #define vfp_single_packed_exponent(v) \ @@ -376,7 +376,7 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); // exception mask, in case nothing handles an instruction. This // doesn't include the NAN flag, which get masked out before // we check for an error. -#define VFP_EXCEPTION_ERROR ((u32)-1 & ~VFP_NAN_FLAG) +#define VFP_EXCEPTION_ERROR ((u32) - 1 & ~VFP_NAN_FLAG) // A flag to tell vfp instruction type. // OP_SCALAR - This operation always operates in scalar mode diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp index 02b52e75b..2a44f6072 100644 --- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp @@ -1164,8 +1164,8 @@ static struct op fops[] = { {vfp_double_fnmul, 0}, {vfp_double_fsub, 0}, {vfp_double_fdiv, 0}, }; -#define FREG_BANK(x) ((x)&0x0c) -#define FREG_IDX(x) ((x)&3) +#define FREG_BANK(x) ((x) & 0x0c) +#define FREG_IDX(x) ((x) & 3) u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { u32 op = inst & FOP_MASK; diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp index cdb8372f3..359d816da 100644 --- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp @@ -1194,8 +1194,8 @@ static struct op fops[] = { {vfp_single_fnmul, 0}, {vfp_single_fsub, 0}, {vfp_single_fdiv, 0}, }; -#define FREG_BANK(x) ((x)&0x18) -#define FREG_IDX(x) ((x)&7) +#define FREG_BANK(x) ((x) & 0x18) +#define FREG_IDX(x) ((x) & 7) u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { u32 op = inst & FOP_MASK; diff --git a/src/core/core.cpp b/src/core/core.cpp index 6acaf6048..965eeeea8 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -689,7 +689,7 @@ void System::serialize(Archive& ar, const unsigned int file_version) { if (Archive::is_saving::value) { num_cores = this->GetNumCores(); } - ar& num_cores; + ar & num_cores; if (Archive::is_loading::value) { // When loading, we want to make sure any lingering state gets cleared out before we begin. @@ -725,7 +725,7 @@ void System::serialize(Archive& ar, const unsigned int file_version) { ar&* memory.get(); ar&* kernel.get(); ar&* gpu.get(); - ar& movie; + ar & movie; // This needs to be set from somewhere - might as well be here! if (Archive::is_loading::value) { diff --git a/src/core/core_timing.h b/src/core/core_timing.h index e8bded04f..d82fc7faf 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -154,18 +154,18 @@ public: private: template void save(Archive& ar, const unsigned int) const { - ar& time; - ar& fifo_order; - ar& user_data; + ar & time; + ar & fifo_order; + ar & user_data; std::string name = *(type->name); ar << name; } template void load(Archive& ar, const unsigned int) { - ar& time; - ar& fifo_order; - ar& user_data; + ar & time; + ar & fifo_order; + ar & user_data; std::string name; ar >> name; type = Global().RegisterEvent(name, nullptr); @@ -239,12 +239,12 @@ public: template void serialize(Archive& ar, const unsigned int) { MoveEvents(); - ar& event_queue; - ar& event_fifo_id; - ar& slice_length; - ar& downcount; - ar& executed_ticks; - ar& idled_cycles; + ar & event_queue; + ar & event_fifo_id; + ar & slice_length; + ar & downcount; + ar & executed_ticks; + ar & idled_cycles; } friend class boost::serialization::access; }; @@ -308,8 +308,8 @@ private: template void serialize(Archive& ar, const unsigned int file_version) { // event_types set during initialization of other things - ar& timers; - ar& current_timer; + ar & timers; + ar & current_timer; if (Archive::is_loading::value) { event_queue_locked = true; } diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h index 7eb3893ba..691b78018 100644 --- a/src/core/file_sys/archive_backend.h +++ b/src/core/file_sys/archive_backend.h @@ -70,20 +70,20 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& type; + ar & type; switch (type) { case LowPathType::Binary: - ar& binary; + ar & binary; break; case LowPathType::Char: - ar& string; + ar & string; break; case LowPathType::Wchar: { std::vector data; if (Archive::is_saving::value) { std::copy(u16str.begin(), u16str.end(), std::back_inserter(data)); } - ar& data; + ar & data; if (Archive::is_loading::value) { u16str = std::u16string(data.data(), data.size()); } @@ -202,7 +202,7 @@ protected: private: template void serialize(Archive& ar, const unsigned int) { - ar& delay_generator; + ar & delay_generator; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index 5093ecdc1..95ac7c4c2 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h @@ -65,8 +65,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& type; - ar& mount_point; + ar & type; + ar & mount_point; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_ncch.h b/src/core/file_sys/archive_ncch.h index 3e22ef02a..2c104b782 100644 --- a/src/core/file_sys/archive_ncch.h +++ b/src/core/file_sys/archive_ncch.h @@ -70,8 +70,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& title_id; - ar& media_type; + ar & title_id; + ar & media_type; } friend class boost::serialization::access; }; @@ -99,7 +99,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& file_buffer; + ar & file_buffer; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_other_savedata.h b/src/core/file_sys/archive_other_savedata.h index c9e720a8d..0febc5f95 100644 --- a/src/core/file_sys/archive_other_savedata.h +++ b/src/core/file_sys/archive_other_savedata.h @@ -33,7 +33,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& sd_savedata_source; + ar & sd_savedata_source; } friend class boost::serialization::access; }; @@ -60,7 +60,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& sd_savedata_source; + ar & sd_savedata_source; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_savedata.h b/src/core/file_sys/archive_savedata.h index dba6d5cdb..5a7ab516c 100644 --- a/src/core/file_sys/archive_savedata.h +++ b/src/core/file_sys/archive_savedata.h @@ -32,7 +32,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& sd_savedata_source; + ar & sd_savedata_source; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h index 267b1dfdf..9d2ecbe34 100644 --- a/src/core/file_sys/archive_sdmc.h +++ b/src/core/file_sys/archive_sdmc.h @@ -47,7 +47,7 @@ protected: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& mount_point; + ar & mount_point; } friend class boost::serialization::access; }; @@ -79,7 +79,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& sdmc_directory; + ar & sdmc_directory; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_sdmcwriteonly.h b/src/core/file_sys/archive_sdmcwriteonly.h index c05f408d9..ff53984d7 100644 --- a/src/core/file_sys/archive_sdmcwriteonly.h +++ b/src/core/file_sys/archive_sdmcwriteonly.h @@ -65,7 +65,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& sdmc_directory; + ar & sdmc_directory; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_selfncch.cpp b/src/core/file_sys/archive_selfncch.cpp index 60454d674..b68f3db96 100644 --- a/src/core/file_sys/archive_selfncch.cpp +++ b/src/core/file_sys/archive_selfncch.cpp @@ -79,7 +79,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& data; + ar & data; } friend class boost::serialization::access; }; @@ -241,7 +241,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& ncch_data; + ar & ncch_data; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_selfncch.h b/src/core/file_sys/archive_selfncch.h index 0643faf63..546201a60 100644 --- a/src/core/file_sys/archive_selfncch.h +++ b/src/core/file_sys/archive_selfncch.h @@ -29,11 +29,11 @@ struct NCCHData { private: template void serialize(Archive& ar, const unsigned int) { - ar& icon; - ar& logo; - ar& banner; - ar& romfs_file; - ar& update_romfs_file; + ar & icon; + ar & logo; + ar & banner; + ar & romfs_file; + ar & update_romfs_file; } friend class boost::serialization::access; }; @@ -61,7 +61,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& ncch_data; + ar & ncch_data; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_source_sd_savedata.h b/src/core/file_sys/archive_source_sd_savedata.h index 07832c3ae..5b98d568e 100644 --- a/src/core/file_sys/archive_source_sd_savedata.h +++ b/src/core/file_sys/archive_source_sd_savedata.h @@ -30,7 +30,7 @@ private: ArchiveSource_SDSaveData() = default; template void serialize(Archive& ar, const unsigned int) { - ar& mount_point; + ar & mount_point; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/archive_systemsavedata.h b/src/core/file_sys/archive_systemsavedata.h index af7c341e2..ea11d95dc 100644 --- a/src/core/file_sys/archive_systemsavedata.h +++ b/src/core/file_sys/archive_systemsavedata.h @@ -35,7 +35,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& base_path; + ar & base_path; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/disk_archive.h b/src/core/file_sys/disk_archive.h index 5843a37d5..1134da167 100644 --- a/src/core/file_sys/disk_archive.h +++ b/src/core/file_sys/disk_archive.h @@ -50,8 +50,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& mode.hex; - ar& file; + ar & mode.hex; + ar & file; } friend class boost::serialization::access; }; @@ -83,12 +83,12 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& directory; + ar & directory; u64 child_index; if (Archive::is_saving::value) { child_index = children_iterator - directory.children.begin(); } - ar& child_index; + ar & child_index; if (Archive::is_loading::value) { children_iterator = directory.children.begin() + child_index; } diff --git a/src/core/file_sys/file_backend.h b/src/core/file_sys/file_backend.h index bf0a1b493..c81f75cba 100644 --- a/src/core/file_sys/file_backend.h +++ b/src/core/file_sys/file_backend.h @@ -105,7 +105,7 @@ protected: template void serialize(Archive& ar, const unsigned int) { - ar& delay_generator; + ar & delay_generator; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h index 765e41444..9ff3c679f 100644 --- a/src/core/file_sys/ivfc_archive.h +++ b/src/core/file_sys/ivfc_archive.h @@ -147,7 +147,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& romfs_file; + ar & romfs_file; } friend class boost::serialization::access; }; @@ -187,9 +187,9 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& romfs_file; - ar& data_offset; - ar& data_size; + ar & romfs_file; + ar & data_offset; + ar & data_size; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/layered_fs.h b/src/core/file_sys/layered_fs.h index 0a0dc5669..69f6e5939 100644 --- a/src/core/file_sys/layered_fs.h +++ b/src/core/file_sys/layered_fs.h @@ -141,10 +141,10 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& romfs; - ar& patch_path; - ar& patch_ext_path; - ar& load_relocations; + ar & romfs; + ar & patch_path; + ar & patch_ext_path; + ar & load_relocations; if (Archive::is_loading::value) { Load(); } diff --git a/src/core/file_sys/romfs_reader.h b/src/core/file_sys/romfs_reader.h index 128d10dbd..7cd7ceac2 100644 --- a/src/core/file_sys/romfs_reader.h +++ b/src/core/file_sys/romfs_reader.h @@ -86,13 +86,13 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& is_encrypted; - ar& file; - ar& key; - ar& ctr; - ar& file_offset; - ar& crypto_offset; - ar& data_size; + ar & is_encrypted; + ar & file; + ar & key; + ar & ctr; + ar & file_offset; + ar & crypto_offset; + ar & data_size; } friend class boost::serialization::access; }; diff --git a/src/core/file_sys/savedata_archive.h b/src/core/file_sys/savedata_archive.h index f72f924f1..8456241ea 100644 --- a/src/core/file_sys/savedata_archive.h +++ b/src/core/file_sys/savedata_archive.h @@ -43,8 +43,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& mount_point; - ar& allow_zero_size_create; + ar & mount_point; + ar & allow_zero_size_create; } friend class boost::serialization::access; }; diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 2135ff2e8..2752a3263 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -83,13 +83,13 @@ public: } /// Inform the driver to swap the front/back buffers and present the current image - virtual void SwapBuffers(){}; + virtual void SwapBuffers() {}; /// Makes the graphics context current for the caller thread - virtual void MakeCurrent(){}; + virtual void MakeCurrent() {}; /// Releases (dunno if this is the "right" word) the context from the caller thread - virtual void DoneCurrent(){}; + virtual void DoneCurrent() {}; /// Gets the GPU driver library (used by Android only) virtual std::shared_ptr GetDriverLibrary() { @@ -183,12 +183,12 @@ public: /** * Save current GraphicsContext. */ - virtual void SaveContext(){}; + virtual void SaveContext() {}; /** * Restore saved GraphicsContext. */ - virtual void RestoreContext(){}; + virtual void RestoreContext() {}; /** * Signal that a touch pressed event has occurred (e.g. mouse click pressed) diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 893492bcd..8de391b10 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -193,10 +193,10 @@ Result AddressArbiter::ArbitrateAddress(std::shared_ptr thread, Arbitrat template void AddressArbiter::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& name; - ar& waiting_threads; - ar& timeout_callback; - ar& resource_limit; + ar & name; + ar & waiting_threads; + ar & timeout_callback; + ar & resource_limit; } SERIALIZE_IMPL(AddressArbiter) diff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cpp index a2cffe39b..bb3f82b69 100644 --- a/src/core/hle/kernel/client_port.cpp +++ b/src/core/hle/kernel/client_port.cpp @@ -53,10 +53,10 @@ void ClientPort::ConnectionClosed() { template void ClientPort::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& server_port; - ar& max_sessions; - ar& active_sessions; - ar& name; + ar & server_port; + ar & max_sessions; + ar & active_sessions; + ar & name; } SERIALIZE_IMPL(ClientPort) diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp index db21846fb..18235b4f3 100644 --- a/src/core/hle/kernel/client_session.cpp +++ b/src/core/hle/kernel/client_session.cpp @@ -59,8 +59,8 @@ Result ClientSession::SendSyncRequest(std::shared_ptr thread) { template void ClientSession::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& name; - ar& parent; + ar & name; + ar & parent; } SERIALIZE_IMPL(ClientSession) diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 70b3594f7..cd4f05193 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -63,10 +63,10 @@ void Event::WakeupAllWaitingThreads() { template void Event::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& reset_type; - ar& signaled; - ar& name; - ar& resource_limit; + ar & reset_type; + ar & signaled; + ar & name; + ar & resource_limit; } SERIALIZE_IMPL(Event) diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index 081135368..e43ec022a 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp @@ -101,10 +101,10 @@ void HandleTable::Clear() { template void HandleTable::serialize(Archive& ar, const unsigned int) { - ar& objects; - ar& generations; - ar& next_generation; - ar& next_free_slot; + ar & objects; + ar & generations; + ar & next_generation; + ar & next_free_slot; } SERIALIZE_IMPL(HandleTable) diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index c0b4c93e7..9aa204cd4 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -64,8 +64,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& callback; - ar& context; + ar & callback; + ar & context; } friend class boost::serialization::access; }; @@ -89,7 +89,7 @@ void SessionRequestHandler::ClientDisconnected(std::shared_ptr se template void SessionRequestHandler::serialize(Archive& ar, const unsigned int) { - ar& connected_sessions; + ar & connected_sessions; } SERIALIZE_IMPL(SessionRequestHandler) @@ -99,8 +99,8 @@ SERIALIZE_IMPL(SessionRequestHandler::SessionDataBase) template void SessionRequestHandler::SessionInfo::serialize(Archive& ar, const unsigned int) { - ar& session; - ar& data; + ar & session; + ar & data; } SERIALIZE_IMPL(SessionRequestHandler::SessionInfo) @@ -324,12 +324,12 @@ void HLERequestContext::ReportUnimplemented() const { template void HLERequestContext::serialize(Archive& ar, const unsigned int) { - ar& cmd_buf; - ar& session; - ar& thread; - ar& request_handles; - ar& static_buffers; - ar& request_mapped_buffers; + ar & cmd_buf; + ar & session; + ar & thread; + ar & request_handles; + ar & static_buffers; + ar & request_mapped_buffers; } SERIALIZE_IMPL(HLERequestContext) diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 5b6ab88b5..8ad58029a 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -152,11 +152,11 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& id; - ar& address; - ar& process; - ar& size; - ar& perms; + ar & id; + ar & address; + ar & process; + ar & size; + ar & perms; } friend class boost::serialization::access; }; @@ -271,7 +271,7 @@ private: if (!Archive::is_loading::value && future.valid()) { future.wait(); } - ar& functor; + ar & functor; } friend class boost::serialization::access; }; diff --git a/src/core/hle/kernel/ipc.cpp b/src/core/hle/kernel/ipc.cpp index dcb8b8acd..2dc17ea7a 100644 --- a/src/core/hle/kernel/ipc.cpp +++ b/src/core/hle/kernel/ipc.cpp @@ -257,11 +257,11 @@ Result TranslateCommandBuffer(Kernel::KernelSystem& kernel, Memory::MemorySystem template void MappedBufferContext::serialize(Archive& ar, const unsigned int) { - ar& permissions; - ar& size; - ar& source_address; - ar& target_address; - ar& buffer; + ar & permissions; + ar & size; + ar & source_address; + ar & target_address; + ar & buffer; } SERIALIZE_IMPL(MappedBufferContext) diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 7e685b11d..c722b8e30 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -165,27 +165,27 @@ void KernelSystem::ResetThreadIDs() { template void KernelSystem::serialize(Archive& ar, const unsigned int) { - ar& memory_regions; - ar& named_ports; + ar & memory_regions; + ar & named_ports; // current_cpu set externally // NB: subsystem references and prepare_reschedule_callback are constant ar&* resource_limits.get(); - ar& next_object_id; + ar & next_object_id; ar&* timer_manager.get(); - ar& next_process_id; - ar& process_list; - ar& current_process; + ar & next_process_id; + ar & process_list; + ar & current_process; // NB: core count checked in 'core' for (auto& thread_manager : thread_managers) { ar&* thread_manager.get(); } - ar& config_mem_handler; - ar& shared_page_handler; - ar& stored_processes; - ar& next_thread_id; - ar& memory_mode; - ar& n3ds_hw_caps; - ar& main_thread_extended_sleep; + ar & config_mem_handler; + ar & shared_page_handler; + ar & stored_processes; + ar & next_thread_id; + ar & memory_mode; + ar & n3ds_hw_caps; + ar & main_thread_extended_sleep; // Deliberately don't include debugger info to allow debugging through loads if (Archive::is_loading::value) { @@ -201,9 +201,9 @@ SERIALIZE_IMPL(KernelSystem) template void New3dsHwCapabilities::serialize(Archive& ar, const unsigned int) { - ar& enable_l2_cache; - ar& enable_804MHz_cpu; - ar& memory_mode; + ar & enable_l2_cache; + ar & enable_804MHz_cpu; + ar & memory_mode; } SERIALIZE_IMPL(New3dsHwCapabilities) diff --git a/src/core/hle/kernel/memory.cpp b/src/core/hle/kernel/memory.cpp index 006d89804..fffa8dd6f 100644 --- a/src/core/hle/kernel/memory.cpp +++ b/src/core/hle/kernel/memory.cpp @@ -273,10 +273,10 @@ void MemoryRegionInfo::Unlock() { template void MemoryRegionInfo::serialize(Archive& ar, const unsigned int) { - ar& base; - ar& size; - ar& used; - ar& free_blocks; + ar & base; + ar & size; + ar & used; + ar & free_blocks; if (Archive::is_loading::value) { is_locked = true; } diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 80b37666b..d3aac8ab1 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -133,11 +133,11 @@ void Mutex::UpdatePriority() { template void Mutex::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& lock_count; - ar& priority; - ar& name; - ar& holding_thread; - ar& resource_limit; + ar & lock_count; + ar & priority; + ar & name; + ar & holding_thread; + ar & resource_limit; } SERIALIZE_IMPL(Mutex) diff --git a/src/core/hle/kernel/object.cpp b/src/core/hle/kernel/object.cpp index 1e32f6125..35581b5a2 100644 --- a/src/core/hle/kernel/object.cpp +++ b/src/core/hle/kernel/object.cpp @@ -43,7 +43,7 @@ bool Object::IsWaitable() const { template void Object::serialize(Archive& ar, const unsigned int) { - ar& object_id; + ar & object_id; } SERIALIZE_IMPL(Object) diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 3d0a315ef..e4200e5df 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -35,36 +35,36 @@ namespace Kernel { template void AddressMapping::serialize(Archive& ar, const unsigned int) { - ar& address; - ar& size; - ar& read_only; - ar& unk_flag; + ar & address; + ar & size; + ar & read_only; + ar & unk_flag; } SERIALIZE_IMPL(AddressMapping) template void Process::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& handle_table; - ar& codeset; // TODO: Replace with apploader reference - ar& resource_limit; - ar& svc_access_mask; - ar& handle_table_size; + ar & handle_table; + ar & codeset; // TODO: Replace with apploader reference + ar & resource_limit; + ar & svc_access_mask; + ar & handle_table_size; ar&(boost::container::vector>&)address_mappings; - ar& flags.raw; - ar& no_thread_restrictions; - ar& kernel_version; - ar& ideal_processor; - ar& status; - ar& process_id; - ar& creation_time_ticks; - ar& vm_manager; - ar& memory_used; - ar& memory_region; - ar& holding_memory; - ar& holding_tls_memory; - ar& tls_slots; + ar & flags.raw; + ar & no_thread_restrictions; + ar & kernel_version; + ar & ideal_processor; + ar & status; + ar & process_id; + ar & creation_time_ticks; + ar & vm_manager; + ar & memory_used; + ar & memory_region; + ar & holding_memory; + ar & holding_tls_memory; + ar & tls_slots; } SERIALIZE_IMPL(Process) @@ -83,19 +83,19 @@ CodeSet::~CodeSet() {} template void CodeSet::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& memory; - ar& segments; - ar& entrypoint; - ar& name; - ar& program_id; + ar & memory; + ar & segments; + ar & entrypoint; + ar & name; + ar & program_id; } SERIALIZE_IMPL(CodeSet) template void CodeSet::Segment::serialize(Archive& ar, const unsigned int) { - ar& offset; - ar& addr; - ar& size; + ar & offset; + ar & addr; + ar & size; } SERIALIZE_IMPL(CodeSet::Segment) diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp index 4575cab37..0ee650584 100644 --- a/src/core/hle/kernel/resource_limit.cpp +++ b/src/core/hle/kernel/resource_limit.cpp @@ -69,9 +69,9 @@ bool ResourceLimit::Release(ResourceLimitType type, s32 amount) { template void ResourceLimit::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& m_name; - ar& m_limit_values; - ar& m_current_values; + ar & m_name; + ar & m_limit_values; + ar & m_current_values; } SERIALIZE_IMPL(ResourceLimit) @@ -154,7 +154,7 @@ std::shared_ptr ResourceLimitList::GetForCategory(ResourceLimitCa template void ResourceLimitList::serialize(Archive& ar, const unsigned int) { - ar& resource_limits; + ar & resource_limits; } SERIALIZE_IMPL(ResourceLimitList) diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp index 5e3129ebb..1aacb6dab 100644 --- a/src/core/hle/kernel/semaphore.cpp +++ b/src/core/hle/kernel/semaphore.cpp @@ -63,10 +63,10 @@ Result Semaphore::Release(s32* out_count, s32 release_count) { template void Semaphore::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& max_count; - ar& available_count; - ar& name; - ar& resource_limit; + ar & max_count; + ar & available_count; + ar & name; + ar & resource_limit; } SERIALIZE_IMPL(Semaphore) diff --git a/src/core/hle/kernel/server_port.cpp b/src/core/hle/kernel/server_port.cpp index 827fa0595..811f86c40 100644 --- a/src/core/hle/kernel/server_port.cpp +++ b/src/core/hle/kernel/server_port.cpp @@ -57,9 +57,9 @@ KernelSystem::PortPair KernelSystem::CreatePortPair(u32 max_sessions, std::strin template void ServerPort::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& name; - ar& pending_sessions; - ar& hle_handler; + ar & name; + ar & pending_sessions; + ar & hle_handler; } SERIALIZE_IMPL(ServerPort) diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 1a5d39226..07902410e 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -21,12 +21,12 @@ namespace Kernel { template void ServerSession::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& name; - ar& parent; - ar& hle_handler; - ar& pending_requesting_threads; - ar& currently_handling; - ar& mapped_buffer_context; + ar & name; + ar & parent; + ar & hle_handler; + ar & pending_requesting_threads; + ar & currently_handling; + ar & mapped_buffer_context; } SERIALIZE_IMPL(ServerSession) diff --git a/src/core/hle/kernel/session.cpp b/src/core/hle/kernel/session.cpp index 1f79de1f9..b25cd49a1 100644 --- a/src/core/hle/kernel/session.cpp +++ b/src/core/hle/kernel/session.cpp @@ -15,9 +15,9 @@ namespace Kernel { template void Session::serialize(Archive& ar, const unsigned int file_version) { - ar& client; - ar& server; - ar& port; + ar & client; + ar & server; + ar & port; } SERIALIZE_IMPL(Session) diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 73d60a3c0..3c7db3f99 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -224,16 +224,16 @@ const u8* SharedMemory::GetPointer(u32 offset) const { template void SharedMemory::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& linear_heap_phys_offset; - ar& backing_blocks; - ar& size; - ar& memory_region; - ar& permissions; - ar& other_permissions; - ar& owner_process; - ar& base_address; - ar& name; - ar& holding_memory; + ar & linear_heap_phys_offset; + ar & backing_blocks; + ar & size; + ar & memory_region; + ar & permissions; + ar & other_permissions; + ar & owner_process; + ar & base_address; + ar & name; + ar & holding_memory; } SERIALIZE_IMPL(SharedMemory) diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 4cc2c0ad0..9040845fc 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -687,7 +687,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& do_output; + ar & do_output; } friend class boost::serialization::access; }; diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index b531ae97f..f8084f5ab 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -33,33 +33,33 @@ namespace Kernel { template void ThreadManager::serialize(Archive& ar, const unsigned int) { - ar& current_thread; - ar& ready_queue; - ar& wakeup_callback_table; - ar& thread_list; + ar & current_thread; + ar & ready_queue; + ar & wakeup_callback_table; + ar & thread_list; } SERIALIZE_IMPL(ThreadManager) template void Thread::serialize(Archive& ar, const unsigned int file_version) { ar& boost::serialization::base_object(*this); - ar& context; - ar& thread_id; - ar& status; - ar& entry_point; - ar& stack_top; - ar& nominal_priority; - ar& current_priority; - ar& last_running_ticks; - ar& processor_id; - ar& tls_address; - ar& held_mutexes; - ar& pending_mutexes; - ar& owner_process; - ar& wait_objects; - ar& wait_address; - ar& name; - ar& wakeup_callback; + ar & context; + ar & thread_id; + ar & status; + ar & entry_point; + ar & stack_top; + ar & nominal_priority; + ar & current_priority; + ar & last_running_ticks; + ar & processor_id; + ar & tls_address; + ar & held_mutexes; + ar & pending_mutexes; + ar & owner_process; + ar & wait_objects; + ar & wait_address; + ar & name; + ar & wakeup_callback; } SERIALIZE_IMPL(Thread) diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index 4274dbc6a..b4c1bde67 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp @@ -102,13 +102,13 @@ void Timer::Signal(s64 cycles_late) { template void Timer::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& reset_type; - ar& initial_delay; - ar& interval_delay; - ar& signaled; - ar& name; - ar& callback_id; - ar& resource_limit; + ar & reset_type; + ar & initial_delay; + ar & interval_delay; + ar & signaled; + ar & name; + ar & callback_id; + ar & resource_limit; } SERIALIZE_IMPL(Timer) @@ -133,8 +133,8 @@ TimerManager::TimerManager(Core::Timing& timing) : timing(timing) { template void TimerManager::serialize(Archive& ar, const unsigned int) { - ar& next_timer_callback_id; - ar& timer_callback_table; + ar & next_timer_callback_id; + ar & timer_callback_table; } SERIALIZE_IMPL(TimerManager) diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 1df94d89e..bcdf3363f 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -43,12 +43,12 @@ bool VirtualMemoryArea::CanBeMergedWith(const VirtualMemoryArea& next) const { template void VirtualMemoryArea::serialize(Archive& ar, const unsigned int) { - ar& base; - ar& size; - ar& type; - ar& permissions; - ar& meminfo_state; - ar& backing_memory; + ar & base; + ar & size; + ar & type; + ar & permissions; + ar & meminfo_state; + ar & backing_memory; } SERIALIZE_IMPL(VirtualMemoryArea) @@ -399,8 +399,8 @@ ResultVal>> VMManager::GetBackingBlocksFor template void VMManager::serialize(Archive& ar, const unsigned int) { - ar& vma_map; - ar& page_table; + ar & vma_map; + ar & page_table; if (Archive::is_loading::value) { is_locked = true; } diff --git a/src/core/hle/kernel/wait_object.cpp b/src/core/hle/kernel/wait_object.cpp index f528d9073..c3144d08c 100644 --- a/src/core/hle/kernel/wait_object.cpp +++ b/src/core/hle/kernel/wait_object.cpp @@ -25,7 +25,7 @@ namespace Kernel { template void WaitObject::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& waiting_threads; + ar & waiting_threads; // NB: hle_notifier *not* serialized since it's a callback! // Fortunately it's only used in one place (DSP) so we can reconstruct it there } diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 3c7a9c855..c7f95b91c 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -229,7 +229,7 @@ union Result { private: template void serialize(Archive& ar, const unsigned int) { - ar& raw; + ar & raw; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/ac/ac.cpp b/src/core/hle/service/ac/ac.cpp index 3c569ed0c..dd5ee5e8e 100644 --- a/src/core/hle/service/ac/ac.cpp +++ b/src/core/hle/service/ac/ac.cpp @@ -366,17 +366,17 @@ Module::Module(Core::System& system_) : system(system_) {} template void Module::serialize(Archive& ar, const unsigned int) { - ar& ac_connected; - ar& close_event; - ar& connect_event; - ar& disconnect_event; + ar & ac_connected; + ar & close_event; + ar & connect_event; + ar & disconnect_event; u32 connect_result_32 = connect_result.raw; - ar& connect_result_32; + ar & connect_result_32; connect_result.raw = connect_result_32; u32 close_result_32 = close_result.raw; - ar& close_result_32; + ar & close_result_32; close_result.raw = close_result_32; - ar& connected_pids; + ar & connected_pids; // default_config is never written to } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index a741e3488..d8d70c9ab 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1796,9 +1796,9 @@ void Module::Interface::EndImportTicket(Kernel::HLERequestContext& ctx) { template void Module::serialize(Archive& ar, const unsigned int) { - ar& cia_installing; - ar& am_title_list; - ar& system_updater_mutex; + ar & cia_installing; + ar & am_title_list; + ar & system_updater_mutex; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/apt/applet_manager.h b/src/core/hle/service/apt/applet_manager.h index dee8afa4e..5aaf7fdac 100644 --- a/src/core/hle/service/apt/applet_manager.h +++ b/src/core/hle/service/apt/applet_manager.h @@ -129,11 +129,11 @@ struct MessageParameter { private: template void serialize(Archive& ar, const unsigned int) { - ar& sender_id; - ar& destination_id; - ar& signal; - ar& object; - ar& buffer; + ar & sender_id; + ar & destination_id; + ar & signal; + ar & object; + ar & buffer; } friend class boost::serialization::access; }; @@ -173,9 +173,9 @@ struct DeliverArg { private: template void serialize(Archive& ar, const unsigned int) { - ar& param; - ar& hmac; - ar& source_program_id; + ar & param; + ar & hmac; + ar & source_program_id; } friend class boost::serialization::access; }; @@ -191,11 +191,11 @@ struct ApplicationJumpParameters { private: template void serialize(Archive& ar, const unsigned int file_version) { - ar& next_title_id; - ar& next_media_type; - ar& flags; - ar& current_title_id; - ar& current_media_type; + ar & next_title_id; + ar & next_media_type; + ar & flags; + ar & current_title_id; + ar & current_media_type; } friend class boost::serialization::access; }; @@ -207,8 +207,8 @@ struct ApplicationStartParameters { private: template void serialize(Archive& ar, const unsigned int) { - ar& next_title_id; - ar& next_media_type; + ar & next_title_id; + ar & next_media_type; } friend class boost::serialization::access; }; @@ -237,14 +237,14 @@ struct CaptureBufferInfo { private: template void serialize(Archive& ar, const unsigned int) { - ar& size; - ar& is_3d; - ar& top_screen_left_offset; - ar& top_screen_right_offset; - ar& top_screen_format; - ar& bottom_screen_left_offset; - ar& bottom_screen_right_offset; - ar& bottom_screen_format; + ar & size; + ar & is_3d; + ar & top_screen_left_offset; + ar & top_screen_right_offset; + ar & top_screen_format; + ar & bottom_screen_left_offset; + ar & bottom_screen_right_offset; + ar & bottom_screen_format; } friend class boost::serialization::access; }; @@ -454,15 +454,15 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& applet_id; - ar& slot; - ar& title_id; - ar& registered; - ar& loaded; - ar& attributes.raw; - ar& notification; - ar& notification_event; - ar& parameter_event; + ar & applet_id; + ar & slot; + ar & title_id; + ar & registered; + ar & loaded; + ar & attributes.raw; + ar & notification; + ar & notification_event; + ar & parameter_event; } friend class boost::serialization::access; }; @@ -527,27 +527,27 @@ private: template void serialize(Archive& ar, const unsigned int file_version) { - ar& next_parameter; - ar& app_jump_parameters; - ar& delayed_parameter; - ar& app_start_parameters; - ar& deliver_arg; - ar& capture_info; - ar& capture_buffer_info; - ar& active_slot; - ar& last_library_launcher_slot; - ar& last_prepared_library_applet; - ar& last_system_launcher_slot; - ar& last_jump_to_home_slot; - ar& ordered_to_close_sys_applet; - ar& ordered_to_close_application; - ar& application_cancelled; - ar& application_close_target; - ar& new_3ds_mode_blocked; - ar& lock; - ar& capture_info; - ar& applet_slots; - ar& library_applet_closing_command; + ar & next_parameter; + ar & app_jump_parameters; + ar & delayed_parameter; + ar & app_start_parameters; + ar & deliver_arg; + ar & capture_info; + ar & capture_buffer_info; + ar & active_slot; + ar & last_library_launcher_slot; + ar & last_prepared_library_applet; + ar & last_system_launcher_slot; + ar & last_jump_to_home_slot; + ar & ordered_to_close_sys_applet; + ar & ordered_to_close_application; + ar & application_cancelled; + ar & application_close_target; + ar & new_3ds_mode_blocked; + ar & lock; + ar & capture_info; + ar & applet_slots; + ar & library_applet_closing_command; if (Archive::is_loading::value) { LoadInputDevices(); diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 3e552dfc4..9e16d12c6 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -41,13 +41,13 @@ namespace Service::APT { template void Module::serialize(Archive& ar, const unsigned int file_version) { - ar& shared_font_mem; - ar& shared_font_loaded; - ar& shared_font_relocated; - ar& cpu_percent; - ar& screen_capture_post_permission; - ar& applet_manager; - ar& wireless_reboot_info; + ar & shared_font_mem; + ar & shared_font_loaded; + ar & shared_font_relocated; + ar & cpu_percent; + ar & screen_capture_post_permission; + ar & applet_manager; + ar & wireless_reboot_info; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h index 81cb4ce4e..8e20a788b 100644 --- a/src/core/hle/service/apt/apt.h +++ b/src/core/hle/service/apt/apt.h @@ -1055,7 +1055,7 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& application_reset_prepared; + ar & application_reset_prepared; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/boss/boss.cpp b/src/core/hle/service/boss/boss.cpp index 7643494bc..dcc064fcf 100644 --- a/src/core/hle/service/boss/boss.cpp +++ b/src/core/hle/service/boss/boss.cpp @@ -19,18 +19,18 @@ namespace Service::BOSS { template void Module::serialize(Archive& ar, const unsigned int) { - ar& task_finish_event; - ar& new_arrival_flag; - ar& ns_data_new_flag; - ar& ns_data_new_flag_privileged; - ar& output_flag; + ar & task_finish_event; + ar & new_arrival_flag; + ar & ns_data_new_flag; + ar & ns_data_new_flag_privileged; + ar & output_flag; } SERIALIZE_IMPL(Module) template void Module::SessionData::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& online_service; + ar & online_service; } SERIALIZE_IMPL(Module::SessionData) diff --git a/src/core/hle/service/boss/online_service.cpp b/src/core/hle/service/boss/online_service.cpp index d289c910b..0435ec9e0 100644 --- a/src/core/hle/service/boss/online_service.cpp +++ b/src/core/hle/service/boss/online_service.cpp @@ -32,17 +32,17 @@ OnlineService::OnlineService(u64 program_id_, u64 extdata_id_) template void OnlineService::serialize(Archive& ar, const unsigned int) { - ar& current_props; - ar& task_id_list; - ar& program_id; - ar& extdata_id; + ar & current_props; + ar & task_id_list; + ar & program_id; + ar & extdata_id; } SERIALIZE_IMPL(OnlineService) template void BossTaskProperties::serialize(Archive& ar, const unsigned int) { - ar& task_result; - ar& properties; + ar & task_result; + ar & properties; } SERIALIZE_IMPL(BossTaskProperties) diff --git a/src/core/hle/service/cam/cam.cpp b/src/core/hle/service/cam/cam.cpp index 46ff98916..f994c6d5a 100644 --- a/src/core/hle/service/cam/cam.cpp +++ b/src/core/hle/service/cam/cam.cpp @@ -26,10 +26,10 @@ namespace Service::CAM { template void Module::serialize(Archive& ar, const unsigned int file_version) { - ar& cameras; - ar& ports; - ar& is_camera_reload_pending; - ar& initialized; + ar & cameras; + ar & ports; + ar & is_camera_reload_pending; + ar & initialized; if (Archive::is_loading::value && initialized) { for (int i = 0; i < NumCameras; i++) { LoadCameraImplementation(cameras[i], i); diff --git a/src/core/hle/service/cam/cam.h b/src/core/hle/service/cam/cam.h index 47439466f..7c2d2f0a9 100644 --- a/src/core/hle/service/cam/cam.h +++ b/src/core/hle/service/cam/cam.h @@ -77,12 +77,12 @@ struct Resolution { private: template void serialize(Archive& ar, const unsigned int) { - ar& width; - ar& height; - ar& crop_x0; - ar& crop_y0; - ar& crop_x1; - ar& crop_y1; + ar & width; + ar & height; + ar & crop_x0; + ar & crop_y0; + ar & crop_x1; + ar & crop_y1; } friend class boost::serialization::access; }; @@ -664,10 +664,10 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& flip; - ar& effect; - ar& format; - ar& resolution; + ar & flip; + ar & effect; + ar & format; + ar & resolution; } friend class boost::serialization::access; }; @@ -681,9 +681,9 @@ private: private: template void serialize(Archive& ar, const unsigned int file_version) { - ar& contexts; - ar& current_context; - ar& frame_rate; + ar & contexts; + ar & current_context; + ar & frame_rate; } friend class boost::serialization::access; }; @@ -726,25 +726,25 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& camera_id; - ar& is_active; - ar& is_pending_receiving; - ar& is_busy; - ar& is_receiving; - ar& is_trimming; - ar& x0; - ar& y0; - ar& x1; - ar& y1; - ar& transfer_bytes; - ar& completion_event; - ar& buffer_error_interrupt_event; - ar& vsync_interrupt_event; - ar& vsync_timings; + ar & camera_id; + ar & is_active; + ar & is_pending_receiving; + ar & is_busy; + ar & is_receiving; + ar & is_trimming; + ar & x0; + ar & y0; + ar & x1; + ar & y1; + ar & transfer_bytes; + ar & completion_event; + ar & buffer_error_interrupt_event; + ar & vsync_interrupt_event; + ar & vsync_timings; // Ignore capture_result. In-progress captures might be affected but this is OK. - ar& dest_process; - ar& dest; - ar& dest_size; + ar & dest_process; + ar & dest; + ar & dest_size; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/cam/y2r_u.cpp b/src/core/hle/service/cam/y2r_u.cpp index 266cf2e92..86b3b7aa9 100644 --- a/src/core/hle/service/cam/y2r_u.cpp +++ b/src/core/hle/service/cam/y2r_u.cpp @@ -22,12 +22,12 @@ namespace Service::Y2R { template void Y2R_U::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& completion_event; - ar& conversion; - ar& dithering_weight_params; - ar& temporal_dithering_enabled; - ar& transfer_end_interrupt_enabled; - ar& spacial_dithering_enabled; + ar & completion_event; + ar & conversion; + ar & dithering_weight_params; + ar & temporal_dithering_enabled; + ar & transfer_end_interrupt_enabled; + ar & spacial_dithering_enabled; } constexpr std::array standard_coefficients{{ diff --git a/src/core/hle/service/cam/y2r_u.h b/src/core/hle/service/cam/y2r_u.h index b8757cd77..281b5479a 100644 --- a/src/core/hle/service/cam/y2r_u.h +++ b/src/core/hle/service/cam/y2r_u.h @@ -96,10 +96,10 @@ struct ConversionBuffer { private: template void serialize(Archive& ar, const unsigned int) { - ar& address; - ar& image_size; - ar& transfer_unit; - ar& gap; + ar & address; + ar & image_size; + ar & transfer_unit; + ar & gap; } friend class boost::serialization::access; }; @@ -127,20 +127,20 @@ struct ConversionConfiguration { private: template void serialize(Archive& ar, const unsigned int) { - ar& input_format; - ar& output_format; - ar& rotation; - ar& block_alignment; - ar& input_line_width; - ar& input_lines; - ar& coefficients; - ar& padding; - ar& alpha; - ar& src_Y; - ar& src_U; - ar& src_V; - ar& src_YUYV; - ar& dst; + ar & input_format; + ar & output_format; + ar & rotation; + ar & block_alignment; + ar & input_line_width; + ar & input_lines; + ar & coefficients; + ar & padding; + ar & alpha; + ar & src_Y; + ar & src_U; + ar & src_V; + ar & src_YUYV; + ar & dst; } friend class boost::serialization::access; }; @@ -166,22 +166,22 @@ struct DitheringWeightParams { private: template void serialize(Archive& ar, const unsigned int) { - ar& w0_xEven_yEven; - ar& w0_xOdd_yEven; - ar& w0_xEven_yOdd; - ar& w0_xOdd_yOdd; - ar& w1_xEven_yEven; - ar& w1_xOdd_yEven; - ar& w1_xEven_yOdd; - ar& w1_xOdd_yOdd; - ar& w2_xEven_yEven; - ar& w2_xOdd_yEven; - ar& w2_xEven_yOdd; - ar& w2_xOdd_yOdd; - ar& w3_xEven_yEven; - ar& w3_xOdd_yEven; - ar& w3_xEven_yOdd; - ar& w3_xOdd_yOdd; + ar & w0_xEven_yEven; + ar & w0_xOdd_yEven; + ar & w0_xEven_yOdd; + ar & w0_xOdd_yOdd; + ar & w1_xEven_yEven; + ar & w1_xOdd_yEven; + ar & w1_xEven_yOdd; + ar & w1_xOdd_yOdd; + ar & w2_xEven_yEven; + ar & w2_xOdd_yEven; + ar & w2_xEven_yOdd; + ar & w2_xOdd_yOdd; + ar & w3_xEven_yEven; + ar & w3_xOdd_yEven; + ar & w3_xEven_yOdd; + ar & w3_xOdd_yOdd; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cpp index bbd4cc0a2..45bd08540 100644 --- a/src/core/hle/service/cecd/cecd.cpp +++ b/src/core/hle/service/cecd/cecd.cpp @@ -35,10 +35,10 @@ namespace Service::CECD { template void Module::serialize(Archive& ar, const unsigned int) { - ar& cecd_system_save_data_archive; - ar& cecinfo_event; - ar& cecinfosys_event; - ar& change_state_event; + ar & cecd_system_save_data_archive; + ar & cecinfo_event; + ar & cecinfosys_event; + ar & change_state_event; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/cecd/cecd.h b/src/core/hle/service/cecd/cecd.h index 5f3787296..ce338ba7f 100644 --- a/src/core/hle/service/cecd/cecd.h +++ b/src/core/hle/service/cecd/cecd.h @@ -255,11 +255,11 @@ public: void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object( *this); - ar& ncch_program_id; - ar& data_path_type; - ar& open_mode.raw; - ar& path; - ar& file; + ar & ncch_program_id; + ar & data_path_type; + ar & open_mode.raw; + ar & path; + ar & file; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index b93265c6b..693d65d71 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -37,10 +37,10 @@ namespace Service::CFG { template void Module::serialize(Archive& ar, const unsigned int) { - ar& cfg_config_file_buffer; - ar& cfg_system_save_data_archive; - ar& preferred_region_code; - ar& preferred_region_chosen; + ar & cfg_config_file_buffer; + ar & cfg_system_save_data_archive; + ar & preferred_region_code; + ar & preferred_region_chosen; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/csnd/csnd_snd.h b/src/core/hle/service/csnd/csnd_snd.h index 0b4cd4331..c4e960777 100644 --- a/src/core/hle/service/csnd/csnd_snd.h +++ b/src/core/hle/service/csnd/csnd_snd.h @@ -39,8 +39,8 @@ struct AdpcmState { private: template void serialize(Archive& ar, const unsigned int) { - ar& predictor; - ar& step_index; + ar & predictor; + ar & step_index; } friend class boost::serialization::access; }; @@ -66,22 +66,22 @@ struct Channel { private: template void serialize(Archive& ar, const unsigned int) { - ar& block1_address; - ar& block2_address; - ar& block1_size; - ar& block2_size; - ar& block1_adpcm_state; - ar& block2_adpcm_state; - ar& block2_adpcm_reload; - ar& left_channel_volume; - ar& right_channel_volume; - ar& left_capture_volume; - ar& right_capture_volume; - ar& sample_rate; - ar& linear_interpolation; - ar& loop_mode; - ar& encoding; - ar& psg_duty; + ar & block1_address; + ar & block2_address; + ar & block1_size; + ar & block2_size; + ar & block1_adpcm_state; + ar & block2_adpcm_state; + ar & block2_adpcm_reload; + ar & left_channel_volume; + ar & right_channel_volume; + ar & left_capture_volume; + ar & right_capture_volume; + ar & sample_rate; + ar & linear_interpolation; + ar & loop_mode; + ar & encoding; + ar & psg_duty; } friend class boost::serialization::access; }; @@ -258,15 +258,15 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& mutex; - ar& shared_memory; - ar& capture_units; - ar& channels; - ar& master_state_offset; - ar& channel_state_offset; - ar& capture_state_offset; - ar& type1_command_offset; - ar& acquired_channel_mask; + ar & mutex; + ar & shared_memory; + ar & capture_units; + ar & channels; + ar & master_state_offset; + ar & channel_state_offset; + ar & capture_state_offset; + ar & type1_command_offset; + ar & acquired_channel_mask; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/dsp/dsp_dsp.h b/src/core/hle/service/dsp/dsp_dsp.h index 1eecb29cc..e47b2bf85 100644 --- a/src/core/hle/service/dsp/dsp_dsp.h +++ b/src/core/hle/service/dsp/dsp_dsp.h @@ -270,11 +270,11 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& semaphore_event; - ar& preset_semaphore; - ar& interrupt_zero; - ar& interrupt_one; - ar& pipes; + ar & semaphore_event; + ar & preset_semaphore; + ar & interrupt_zero; + ar & interrupt_one; + ar & pipes; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/frd/frd.h b/src/core/hle/service/frd/frd.h index bb5199cb7..004fdb1af 100644 --- a/src/core/hle/service/frd/frd.h +++ b/src/core/hle/service/frd/frd.h @@ -26,9 +26,9 @@ struct FriendKey { private: template void serialize(Archive& ar, const unsigned int) { - ar& friend_id; - ar& unknown; - ar& friend_code; + ar & friend_id; + ar & unknown; + ar & friend_code; } friend class boost::serialization::access; }; @@ -39,7 +39,7 @@ struct MyPresence { private: template void serialize(Archive& ar, const unsigned int) { - ar& unknown; + ar & unknown; } friend class boost::serialization::access; }; @@ -271,9 +271,9 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& my_friend_key; - ar& my_presence; - ar& logged_in; + ar & my_friend_key; + ar & my_presence; + ar & logged_in; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index 245e929f9..2479dacb0 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h @@ -287,9 +287,9 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& id_code_map; - ar& handle_map; - ar& next_handle; + ar & id_code_map; + ar & handle_map; + ar & next_handle; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/fs/directory.cpp b/src/core/hle/service/fs/directory.cpp index e83649a1d..0a862f097 100644 --- a/src/core/hle/service/fs/directory.cpp +++ b/src/core/hle/service/fs/directory.cpp @@ -17,8 +17,8 @@ namespace Service::FS { template void Directory::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& path; - ar& backend; + ar & path; + ar & backend; } Directory::Directory(std::unique_ptr&& backend, diff --git a/src/core/hle/service/fs/file.cpp b/src/core/hle/service/fs/file.cpp index 702e2018e..90c31181b 100644 --- a/src/core/hle/service/fs/file.cpp +++ b/src/core/hle/service/fs/file.cpp @@ -23,8 +23,8 @@ namespace Service::FS { template void File::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& path; - ar& backend; + ar & path; + ar & backend; } File::File() : File(Core::Global()) {} diff --git a/src/core/hle/service/fs/file.h b/src/core/hle/service/fs/file.h index a6ef69304..92d610214 100644 --- a/src/core/hle/service/fs/file.h +++ b/src/core/hle/service/fs/file.h @@ -27,10 +27,10 @@ private: void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object( *this); - ar& priority; - ar& offset; - ar& size; - ar& subfile; + ar & priority; + ar & offset; + ar & size; + ar & subfile; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/fs/fs_user.h b/src/core/hle/service/fs/fs_user.h index 57285995a..a6030782e 100644 --- a/src/core/hle/service/fs/fs_user.h +++ b/src/core/hle/service/fs/fs_user.h @@ -40,7 +40,7 @@ private: void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object( *this); - ar& program_id; + ar & program_id; } friend class boost::serialization::access; }; @@ -725,7 +725,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& priority; + ar & priority; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/gsp/gsp_gpu.cpp b/src/core/hle/service/gsp/gsp_gpu.cpp index 374bbe3c6..b08d014b6 100644 --- a/src/core/hle/service/gsp/gsp_gpu.cpp +++ b/src/core/hle/service/gsp/gsp_gpu.cpp @@ -674,11 +674,11 @@ SessionData* GSP_GPU::FindRegisteredThreadData(u32 thread_id) { template void GSP_GPU::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& shared_memory; - ar& active_thread_id; - ar& first_initialization; - ar& used_thread_ids; - ar& saved_vram; + ar & shared_memory; + ar & active_thread_id; + ar & first_initialization; + ar & used_thread_ids; + ar & saved_vram; } SERIALIZE_IMPL(GSP_GPU) @@ -737,10 +737,10 @@ std::unique_ptr GSP_GPU::MakeSes template void SessionData::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& gsp; - ar& interrupt_event; - ar& thread_id; - ar& registered; + ar & gsp; + ar & interrupt_event; + ar & thread_id; + ar & registered; } SERIALIZE_IMPL(SessionData) diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 9013fd4b1..98f53cff5 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -30,24 +30,24 @@ namespace Service::HID { template void Module::serialize(Archive& ar, const unsigned int file_version) { - ar& shared_mem; - ar& event_pad_or_touch_1; - ar& event_pad_or_touch_2; - ar& event_accelerometer; - ar& event_gyroscope; - ar& event_debug_pad; - ar& next_pad_index; - ar& next_touch_index; - ar& next_accelerometer_index; - ar& next_gyroscope_index; - ar& enable_accelerometer_count; - ar& enable_gyroscope_count; + ar & shared_mem; + ar & event_pad_or_touch_1; + ar & event_pad_or_touch_2; + ar & event_accelerometer; + ar & event_gyroscope; + ar & event_debug_pad; + ar & next_pad_index; + ar & next_touch_index; + ar & next_accelerometer_index; + ar & next_gyroscope_index; + ar & enable_accelerometer_count; + ar & enable_gyroscope_count; if (Archive::is_loading::value) { LoadInputDevices(); } - ar& state.hex; - ar& circle_pad_old_x; - ar& circle_pad_old_y; + ar & state.hex; + ar & circle_pad_old_x; + ar & circle_pad_old_y; // Update events are set in the constructor // Devices are set from the implementation (and are stateless afaik) } diff --git a/src/core/hle/service/http/http_c.h b/src/core/hle/service/http/http_c.h index 7f71aebcd..93becaae8 100644 --- a/src/core/hle/service/http/http_c.h +++ b/src/core/hle/service/http/http_c.h @@ -93,11 +93,11 @@ struct ClientCertContext { private: template void serialize(Archive& ar, const unsigned int) { - ar& handle; - ar& session_id; - ar& cert_id; - ar& certificate; - ar& private_key; + ar & handle; + ar & session_id; + ar & cert_id; + ar & certificate; + ar & private_key; } friend class boost::serialization::access; }; @@ -115,9 +115,9 @@ struct RootCertChain { private: template void serialize(Archive& ar, const unsigned int) { - ar& handle; - ar& session_id; - ar& certificate; + ar & handle; + ar & session_id; + ar & certificate; } friend class boost::serialization::access; }; @@ -130,9 +130,9 @@ struct RootCertChain { private: template void serialize(Archive& ar, const unsigned int) { - ar& handle; - ar& session_id; - ar& certificates; + ar & handle; + ar & session_id; + ar & certificates; } friend class boost::serialization::access; }; @@ -161,10 +161,10 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& url; - ar& username; - ar& password; - ar& port; + ar & url; + ar & username; + ar & password; + ar & port; } friend class boost::serialization::access; }; @@ -176,8 +176,8 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& username; - ar& password; + ar & username; + ar & password; } friend class boost::serialization::access; }; @@ -190,8 +190,8 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& name; - ar& value; + ar & name; + ar & value; } friend class boost::serialization::access; }; @@ -204,9 +204,9 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& options; - ar& client_cert_ctx; - ar& root_ca_chain; + ar & options; + ar & client_cert_ctx; + ar & root_ca_chain; } friend class boost::serialization::access; }; @@ -237,9 +237,9 @@ public: private: template void serialize(Archive& ar, const unsigned int) { - ar& name; - ar& value; - ar& is_binary; + ar & name; + ar & value; + ar & is_binary; } friend class boost::serialization::access; }; @@ -308,11 +308,11 @@ private: void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object( *this); - ar& current_http_context; - ar& session_id; - ar& num_http_contexts; - ar& num_client_certs; - ar& initialized; + ar & current_http_context; + ar & session_id; + ar & num_http_contexts; + ar & num_client_certs; + ar & initialized; } friend class boost::serialization::access; }; @@ -880,12 +880,12 @@ private: // There is a very good chance that saving/loading during a network connection will break, // regardless! ar& boost::serialization::base_object(*this); - ar& ClCertA.certificate; - ar& ClCertA.private_key; - ar& ClCertA.init; - ar& context_counter; - ar& client_certs_counter; - ar& client_certs; + ar & ClCertA.certificate; + ar & ClCertA.private_key; + ar & ClCertA.init; + ar & context_counter; + ar & client_certs_counter; + ar & client_certs; // NOTE: `contexts` is not serialized because it contains non-serializable data. (i.e. // handles to ongoing HTTP requests.) Serializing across HTTP contexts will break. } diff --git a/src/core/hle/service/ir/extra_hid.h b/src/core/hle/service/ir/extra_hid.h index 5dc36b4cd..0132b07b9 100644 --- a/src/core/hle/service/ir/extra_hid.h +++ b/src/core/hle/service/ir/extra_hid.h @@ -72,8 +72,8 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& hid_period; - ar& calibration_data; // This isn't writeable for now, but might be in future + ar & hid_period; + ar & calibration_data; // This isn't writeable for now, but might be in future if (Archive::is_loading::value) { LoadInputDevices(); // zl, zr, c_stick are loaded here } diff --git a/src/core/hle/service/ir/ir_rst.cpp b/src/core/hle/service/ir/ir_rst.cpp index 2e2cd5b94..469abd413 100644 --- a/src/core/hle/service/ir/ir_rst.cpp +++ b/src/core/hle/service/ir/ir_rst.cpp @@ -23,11 +23,11 @@ namespace Service::IR { template void IR_RST::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& update_event; - ar& shared_memory; - ar& next_pad_index; - ar& raw_c_stick; - ar& update_period; + ar & update_event; + ar & shared_memory; + ar & next_pad_index; + ar & raw_c_stick; + ar & update_period; // update_callback_id and input devices are set separately ReloadInputDevices(); } diff --git a/src/core/hle/service/ir/ir_user.cpp b/src/core/hle/service/ir/ir_user.cpp index add0eb3d0..c9e33a202 100644 --- a/src/core/hle/service/ir/ir_user.cpp +++ b/src/core/hle/service/ir/ir_user.cpp @@ -26,12 +26,12 @@ namespace Service::IR { template void IR_USER::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& conn_status_event; - ar& send_event; - ar& receive_event; - ar& shared_memory; - ar& connected_device; - ar& receive_buffer; + ar & conn_status_event; + ar & send_event; + ar & receive_event; + ar & shared_memory; + ar & connected_device; + ar & receive_buffer; ar&* extra_hid.get(); } @@ -164,10 +164,10 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& begin_index; - ar& end_index; - ar& packet_count; - ar& unknown; + ar & begin_index; + ar & end_index; + ar & packet_count; + ar & unknown; } friend class boost::serialization::access; }; @@ -216,12 +216,12 @@ private: template void serialize(Archive& ar, const unsigned int) { - ar& info; - ar& shared_memory; - ar& info_offset; - ar& buffer_offset; - ar& max_packet_count; - ar& max_data_size; + ar & info; + ar & shared_memory; + ar & info_offset; + ar & buffer_offset; + ar & max_packet_count; + ar & max_data_size; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/ldr_ro/ldr_ro.h b/src/core/hle/service/ldr_ro/ldr_ro.h index 7581884f6..eb00f55e3 100644 --- a/src/core/hle/service/ldr_ro/ldr_ro.h +++ b/src/core/hle/service/ldr_ro/ldr_ro.h @@ -20,7 +20,7 @@ private: void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object( *this); - ar& loaded_crs; + ar & loaded_crs; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/mic/mic_u.cpp b/src/core/hle/service/mic/mic_u.cpp index 1ed15cd25..4363b3ab1 100644 --- a/src/core/hle/service/mic/mic_u.cpp +++ b/src/core/hle/service/mic/mic_u.cpp @@ -118,17 +118,17 @@ private: template void serialize(Archive& ar, const unsigned int) { std::shared_ptr _memory_ref = memory_ref.lock(); - ar& _memory_ref; + ar & _memory_ref; memory_ref = _memory_ref; - ar& sharedmem_size; - ar& size; - ar& offset; - ar& initial_offset; - ar& looped_buffer; - ar& sample_size; - ar& gain; - ar& power; - ar& sample_rate; + ar & sharedmem_size; + ar & size; + ar & offset; + ar & initial_offset; + ar & looped_buffer; + ar & sample_size; + ar & gain; + ar & power; + ar & sample_rate; sharedmem_buffer = _memory_ref ? _memory_ref->GetPointer() : nullptr; } friend class boost::serialization::access; @@ -400,19 +400,19 @@ struct MIC_U::Impl { private: template void serialize(Archive& ar, const unsigned int file_version) { - ar& change_mic_impl_requested; - ar& buffer_full_event; + ar & change_mic_impl_requested; + ar & buffer_full_event; // buffer_write_event set in constructor - ar& shared_memory; - ar& client_version; - ar& allow_shell_closed; - ar& clamp; + ar & shared_memory; + ar & client_version; + ar & allow_shell_closed; + ar & clamp; // mic interface set in constructor - ar& state; + ar & state; // Maintain the internal mic state - ar& encoding; + ar & encoding; bool is_sampling = mic && mic->IsSampling(); - ar& is_sampling; + ar & is_sampling; if (Archive::is_loading::value) { if (is_sampling) { CreateMic(); diff --git a/src/core/hle/service/ndm/ndm_u.h b/src/core/hle/service/ndm/ndm_u.h index aebc6fa8b..3270e78c3 100644 --- a/src/core/hle/service/ndm/ndm_u.h +++ b/src/core/hle/service/ndm/ndm_u.h @@ -275,13 +275,13 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& daemon_bit_mask; - ar& default_daemon_bit_mask; - ar& daemon_status; - ar& exclusive_state; - ar& scan_interval; - ar& retry_interval; - ar& daemon_lock_enabled; + ar & daemon_bit_mask; + ar & default_daemon_bit_mask; + ar & daemon_status; + ar & exclusive_state; + ar & scan_interval; + ar & retry_interval; + ar & daemon_lock_enabled; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/news/news.cpp b/src/core/hle/service/news/news.cpp index f1a32d168..9db459c6a 100644 --- a/src/core/hle/service/news/news.cpp +++ b/src/core/hle/service/news/news.cpp @@ -45,10 +45,10 @@ constexpr std::array news_system_savedata_id{ template void Module::serialize(Archive& ar, const unsigned int) { - ar& db; - ar& notification_ids; - ar& automatic_sync_flag; - ar& news_system_save_data_archive; + ar & db; + ar & notification_ids; + ar & automatic_sync_flag; + ar & news_system_save_data_archive; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/news/news.h b/src/core/hle/service/news/news.h index 1d2382937..2e9bf2c96 100644 --- a/src/core/hle/service/news/news.h +++ b/src/core/hle/service/news/news.h @@ -26,8 +26,8 @@ struct NewsDBHeader { private: template void serialize(Archive& ar, const unsigned int) { - ar& valid; - ar& flags; + ar & valid; + ar & flags; } friend class boost::serialization::access; }; @@ -57,19 +57,19 @@ struct NotificationHeader { private: template void serialize(Archive& ar, const unsigned int) { - ar& flag_valid; - ar& flag_read; - ar& flag_jpeg; - ar& flag_boss; - ar& flag_optout; - ar& flag_url; - ar& flag_unk0x6; - ar& program_id; - ar& ns_data_id; - ar& version; - ar& jump_param; - ar& date_time; - ar& title; + ar & flag_valid; + ar & flag_read; + ar & flag_jpeg; + ar & flag_boss; + ar & flag_optout; + ar & flag_url; + ar & flag_unk0x6; + ar & program_id; + ar & ns_data_id; + ar & version; + ar & jump_param; + ar & date_time; + ar & title; } friend class boost::serialization::access; }; @@ -82,8 +82,8 @@ struct NewsDB { private: template void serialize(Archive& ar, const unsigned int) { - ar& header; - ar& notifications; + ar & header; + ar & notifications; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index 756b433f9..528ec84bc 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp @@ -16,8 +16,8 @@ namespace Service::NFC { template void Module::serialize(Archive& ar, const unsigned int) { - ar& nfc_mode; - ar& device; + ar & nfc_mode; + ar & device; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/nfc/nfc_device.cpp b/src/core/hle/service/nfc/nfc_device.cpp index fa8bd3558..dd388f51b 100644 --- a/src/core/hle/service/nfc/nfc_device.cpp +++ b/src/core/hle/service/nfc/nfc_device.cpp @@ -21,21 +21,21 @@ SERVICE_CONSTRUCT_IMPL(Service::NFC::NfcDevice) namespace Service::NFC { template void NfcDevice::serialize(Archive& ar, const unsigned int) { - ar& tag_in_range_event; - ar& tag_out_of_range_event; - ar& is_initalized; - ar& is_data_moddified; - ar& is_app_area_open; - ar& is_plain_amiibo; - ar& is_write_protected; - ar& is_tag_in_range; - ar& allowed_protocols; - ar& device_state; - ar& connection_state; - ar& communication_state; - ar& amiibo_filename; - ar& tag; - ar& encrypted_tag; + ar & tag_in_range_event; + ar & tag_out_of_range_event; + ar & is_initalized; + ar & is_data_moddified; + ar & is_app_area_open; + ar & is_plain_amiibo; + ar & is_write_protected; + ar & is_tag_in_range; + ar & allowed_protocols; + ar & device_state; + ar & connection_state; + ar & communication_state; + ar & amiibo_filename; + ar & tag; + ar & encrypted_tag; } SERIALIZE_IMPL(NfcDevice) diff --git a/src/core/hle/service/nfc/nfc_types.h b/src/core/hle/service/nfc/nfc_types.h index 8b08aca9c..91657369f 100644 --- a/src/core/hle/service/nfc/nfc_types.h +++ b/src/core/hle/service/nfc/nfc_types.h @@ -150,9 +150,9 @@ struct TagUuid { template void serialize(Archive& ar, const unsigned int) { - ar& uid; - ar& nintendo_id; - ar& lock_bytes; + ar & uid; + ar & nintendo_id; + ar & lock_bytes; } friend class boost::serialization::access; }; @@ -259,9 +259,9 @@ struct NTAG215Password { template void serialize(Archive& ar, const unsigned int) { - ar& PWD; - ar& PACK; - ar& RFUI; + ar & PWD; + ar & PACK; + ar & RFUI; } friend class boost::serialization::access; }; @@ -344,7 +344,7 @@ struct SerializableAmiiboFile { }; template void serialize(Archive& ar, const unsigned int) { - ar& raw; + ar & raw; } friend class boost::serialization::access; }; @@ -359,7 +359,7 @@ struct SerializableEncryptedAmiiboFile { }; template void serialize(Archive& ar, const unsigned int) { - ar& raw; + ar & raw; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/nim/nim_u.h b/src/core/hle/service/nim/nim_u.h index c3042e985..667a25b26 100644 --- a/src/core/hle/service/nim/nim_u.h +++ b/src/core/hle/service/nim/nim_u.h @@ -533,9 +533,9 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& nim_system_update_event_for_menu; - ar& nim_system_update_event_for_news; - ar& nim_async_completion_event; + ar & nim_system_update_event_for_menu; + ar & nim_system_update_event_for_news; + ar & nim_async_completion_event; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index fcd42d991..a8e8c3c9d 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -31,9 +31,9 @@ namespace Service::NWM { template void NWM_UDS::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& node_map; - ar& connection_event; - ar& received_beacons; + ar & node_map; + ar & connection_event; + ar & received_beacons; // wifi_packet_received set in constructor } @@ -1271,7 +1271,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& command_id; + ar & command_id; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/nwm/nwm_uds.h b/src/core/hle/service/nwm/nwm_uds.h index e3f2e588f..cf59e7bcd 100644 --- a/src/core/hle/service/nwm/nwm_uds.h +++ b/src/core/hle/service/nwm/nwm_uds.h @@ -553,8 +553,8 @@ private: private: template void serialize(Archive& ar, const unsigned int) { - ar& connected; - ar& node_id; + ar & connected; + ar & node_id; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/plgldr/plgldr.cpp b/src/core/hle/service/plgldr/plgldr.cpp index 1c1a221da..071a6217f 100644 --- a/src/core/hle/service/plgldr/plgldr.cpp +++ b/src/core/hle/service/plgldr/plgldr.cpp @@ -65,28 +65,28 @@ PLG_LDR::PLG_LDR(Core::System& system_) : ServiceFramework{"plg:ldr", 1}, system template void PLG_LDR::PluginLoaderContext::serialize(Archive& ar, const unsigned int) { - ar& is_enabled; - ar& allow_game_change; - ar& plugin_loaded; - ar& is_default_path; - ar& plugin_path; - ar& use_user_load_parameters; - ar& user_load_parameters; - ar& plg_event; - ar& plg_reply; - ar& memory_changed_handle; - ar& is_exe_load_function_set; - ar& exe_load_checksum; - ar& load_exe_func; - ar& load_exe_args; - ar& plugin_fb_addr; + ar & is_enabled; + ar & allow_game_change; + ar & plugin_loaded; + ar & is_default_path; + ar & plugin_path; + ar & use_user_load_parameters; + ar & user_load_parameters; + ar & plg_event; + ar & plg_reply; + ar & memory_changed_handle; + ar & is_exe_load_function_set; + ar & exe_load_checksum; + ar & load_exe_func; + ar & load_exe_args; + ar & plugin_fb_addr; } SERIALIZE_IMPL(PLG_LDR::PluginLoaderContext) template void PLG_LDR::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& plgldr_context; + ar & plgldr_context; } SERIALIZE_IMPL(PLG_LDR) diff --git a/src/core/hle/service/plgldr/plgldr.h b/src/core/hle/service/plgldr/plgldr.h index 240324238..192a86e23 100644 --- a/src/core/hle/service/plgldr/plgldr.h +++ b/src/core/hle/service/plgldr/plgldr.h @@ -43,11 +43,11 @@ public: template void serialize(Archive& ar, const unsigned int) { - ar& no_flash; - ar& no_IR_Patch; - ar& low_title_Id; - ar& path; - ar& config; + ar & no_flash; + ar & no_IR_Patch; + ar & low_title_Id; + ar & path; + ar & config; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index 6f609182b..3c99a2486 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp @@ -224,9 +224,9 @@ Module::Module(Core::System& system_) : system(system_) { template void Module::serialize(Archive& ar, const unsigned int) { - ar& shell_open; - ar& battery_is_charging; - ar& pedometer_is_counting; + ar & shell_open; + ar & battery_is_charging; + ar & pedometer_is_counting; } SERIALIZE_IMPL(Module) diff --git a/src/core/hle/service/sm/srv.cpp b/src/core/hle/service/sm/srv.cpp index 97d563771..8463cd40c 100644 --- a/src/core/hle/service/sm/srv.cpp +++ b/src/core/hle/service/sm/srv.cpp @@ -32,8 +32,8 @@ namespace Service::SM { template void SRV::serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& notification_semaphore; - ar& get_service_handle_delayed_map; + ar & notification_semaphore; + ar & get_service_handle_delayed_map; } constexpr int MAX_PENDING_NOTIFICATIONS = 16; @@ -123,7 +123,7 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& name; + ar & name; } friend class boost::serialization::access; }; diff --git a/src/core/hle/service/soc/soc_u.h b/src/core/hle/service/soc/soc_u.h index 2a7cfa8e8..b63f290e4 100644 --- a/src/core/hle/service/soc/soc_u.h +++ b/src/core/hle/service/soc/soc_u.h @@ -39,10 +39,10 @@ struct SocketHolder { private: template void serialize(Archive& ar, const unsigned int) { - ar& socket_fd; - ar& blocking; - ar& isGlobal; - ar& ownerProcess; + ar & socket_fd; + ar & blocking; + ar & isGlobal; + ar & ownerProcess; } friend class boost::serialization::access; }; @@ -170,8 +170,8 @@ private: template void serialize(Archive& ar, const unsigned int) { ar& boost::serialization::base_object(*this); - ar& created_sockets; - ar& initialized_processes; + ar & created_sockets; + ar & initialized_processes; } friend class boost::serialization::access; }; diff --git a/src/core/memory.cpp b/src/core/memory.cpp index eb4ab42d4..5bb8abdfc 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -77,10 +77,10 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int file_version) { - ar& vram; - ar& linear_heap; - ar& new_linear_heap; - ar& plugin_fb; + ar & vram; + ar & linear_heap; + ar & new_linear_heap; + ar & plugin_fb; } }; @@ -318,20 +318,20 @@ private: template void serialize(Archive& ar, const unsigned int file_version) { bool save_n3ds_ram = Settings::values.is_new_3ds.GetValue(); - ar& save_n3ds_ram; + ar & save_n3ds_ram; ar& boost::serialization::make_binary_object(vram.get(), Memory::VRAM_SIZE); ar& boost::serialization::make_binary_object( fcram.get(), save_n3ds_ram ? Memory::FCRAM_N3DS_SIZE : Memory::FCRAM_SIZE); ar& boost::serialization::make_binary_object( n3ds_extra_ram.get(), save_n3ds_ram ? Memory::N3DS_EXTRA_RAM_SIZE : 0); - ar& cache_marker; - ar& page_table_list; + ar & cache_marker; + ar & page_table_list; // dsp is set from Core::System at startup - ar& current_page_table; - ar& fcram_mem; - ar& vram_mem; - ar& n3ds_extra_ram_mem; - ar& dsp_mem; + ar & current_page_table; + ar & fcram_mem; + ar & vram_mem; + ar & n3ds_extra_ram_mem; + ar & dsp_mem; } }; diff --git a/src/core/memory.h b/src/core/memory.h index 3aaf09bbe..5bb98fb18 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -105,8 +105,8 @@ struct PageTable { private: template void serialize(Archive& ar, const unsigned int) { - ar& pointers.refs; - ar& attributes; + ar & pointers.refs; + ar & attributes; for (std::size_t i = 0; i < PAGE_TABLE_NUM_ENTRIES; i++) { pointers.raw[i] = pointers.refs[i].GetPtr(); } diff --git a/src/core/movie.cpp b/src/core/movie.cpp index c7dd23c90..372edb5bd 100644 --- a/src/core/movie.cpp +++ b/src/core/movie.cpp @@ -151,19 +151,19 @@ template void Movie::serialize(Archive& ar, const unsigned int file_version) { // Only serialize what's needed to make savestates useful for TAS: u64 _current_byte = static_cast(current_byte); - ar& _current_byte; + ar & _current_byte; current_byte = static_cast(_current_byte); - ar& current_input; + ar & current_input; std::vector recorded_input_ = recorded_input; - ar& recorded_input_; + ar & recorded_input_; - ar& init_time; - ar& base_ticks; + ar & init_time; + ar & base_ticks; if (Archive::is_loading::value) { u64 savestate_movie_id; - ar& savestate_movie_id; + ar & savestate_movie_id; if (id != savestate_movie_id) { if (savestate_movie_id == 0) { throw std::runtime_error("You must close your movie to load this state"); @@ -172,12 +172,12 @@ void Movie::serialize(Archive& ar, const unsigned int file_version) { } } } else { - ar& id; + ar & id; } // Whether the state was made in MovieFinished state bool post_movie = play_mode == PlayMode::MovieFinished; - ar& post_movie; + ar & post_movie; if (Archive::is_loading::value && id != 0) { if (!read_only) { diff --git a/src/lime_qt/configuration/configure_cheats.cpp b/src/lime_qt/configuration/configure_cheats.cpp index aa67f7440..1138dae2b 100644 --- a/src/lime_qt/configuration/configure_cheats.cpp +++ b/src/lime_qt/configuration/configure_cheats.cpp @@ -12,9 +12,8 @@ #include "ui_configure_cheats.h" ConfigureCheats::ConfigureCheats(Cheats::CheatEngine& cheat_engine_, u64 title_id_, QWidget* parent) - : QWidget(parent), - ui(std::make_unique()), cheat_engine{cheat_engine_}, title_id{ - title_id_} { + : QWidget(parent), ui(std::make_unique()), cheat_engine{cheat_engine_}, + title_id{title_id_} { // Setup gui control settings ui->setupUi(this); ui->tableCheats->setColumnWidth(0, 30); diff --git a/src/lime_qt/debugger/graphics/graphics_breakpoints.cpp b/src/lime_qt/debugger/graphics/graphics_breakpoints.cpp index 98208b6a2..cb68f45a7 100644 --- a/src/lime_qt/debugger/graphics/graphics_breakpoints.cpp +++ b/src/lime_qt/debugger/graphics/graphics_breakpoints.cpp @@ -141,8 +141,8 @@ QString BreakPointModel::DebugContextEventToString(Pica::DebugContext::Event eve GraphicsBreakPointsWidget::GraphicsBreakPointsWidget( std::shared_ptr debug_context, QWidget* parent) - : QDockWidget(tr("Pica Breakpoints"), parent), Pica::DebugContext::BreakPointObserver( - debug_context) { + : QDockWidget(tr("Pica Breakpoints"), parent), + Pica::DebugContext::BreakPointObserver(debug_context) { setObjectName(QStringLiteral("PicaBreakPointsWidget")); status_text = new QLabel(tr("Emulation running")); diff --git a/src/lime_qt/movie/movie_play_dialog.cpp b/src/lime_qt/movie/movie_play_dialog.cpp index efe0640d7..2854a1a49 100644 --- a/src/lime_qt/movie/movie_play_dialog.cpp +++ b/src/lime_qt/movie/movie_play_dialog.cpp @@ -16,8 +16,8 @@ #include "ui_movie_play_dialog.h" MoviePlayDialog::MoviePlayDialog(QWidget* parent, GameList* game_list_, const Core::System& system_) - : QDialog(parent), - ui(std::make_unique()), game_list{game_list_}, system{system_} { + : QDialog(parent), ui(std::make_unique()), game_list{game_list_}, + system{system_} { ui->setupUi(this); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); diff --git a/src/network/packet.cpp b/src/network/packet.cpp index 1b62fdf60..fd720678d 100644 --- a/src/network/packet.cpp +++ b/src/network/packet.cpp @@ -15,13 +15,13 @@ namespace Network { #ifndef htonll 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 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/network/room_member.h b/src/network/room_member.h index ee1c921d4..ea08d73e8 100644 --- a/src/network/room_member.h +++ b/src/network/room_member.h @@ -35,11 +35,11 @@ struct WifiPacket { private: template void serialize(Archive& ar, const unsigned int) { - ar& type; - ar& data; - ar& transmitter_address; - ar& destination_address; - ar& channel; + ar & type; + ar & data; + ar & transmitter_address; + ar & destination_address; + ar & channel; } friend class boost::serialization::access; }; diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index cc06078b9..a8193a600 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -43,8 +43,8 @@ struct GPU::Impl { : timing{system.CoreTiming()}, system{system}, memory{system.Memory()}, debug_context{Pica::g_debug_context}, pica{memory, debug_context}, renderer{VideoCore::CreateRenderer(emu_window, secondary_window, pica, system)}, - rasterizer{renderer->Rasterizer()}, sw_blitter{std::make_unique( - memory, rasterizer)} {} + rasterizer{renderer->Rasterizer()}, + sw_blitter{std::make_unique(memory, rasterizer)} {} ~Impl() = default; }; diff --git a/src/video_core/pica/geometry_pipeline.cpp b/src/video_core/pica/geometry_pipeline.cpp index 8b2d8d697..32f9c21fd 100644 --- a/src/video_core/pica/geometry_pipeline.cpp +++ b/src/video_core/pica/geometry_pipeline.cpp @@ -390,7 +390,7 @@ void GeometryPipeline::SubmitVertex(const AttributeBuffer& input) { template void GeometryPipeline::serialize(Archive& ar, const unsigned int version) { // vertex_handler and shader_engine are always set to the same value - ar& backend; + ar & backend; } } // namespace Pica diff --git a/src/video_core/pica/output_vertex.h b/src/video_core/pica/output_vertex.h index d39210327..ded80a75e 100644 --- a/src/video_core/pica/output_vertex.h +++ b/src/video_core/pica/output_vertex.h @@ -32,14 +32,14 @@ struct OutputVertex { private: template void serialize(Archive& ar, const u32) { - ar& pos; - ar& quat; - ar& color; - ar& tc0; - ar& tc1; - ar& tc0_w; - ar& view; - ar& tc2; + ar & pos; + ar & quat; + ar & color; + ar & tc0; + ar & tc1; + ar & tc0_w; + ar & view; + ar & tc2; } friend class boost::serialization::access; }; diff --git a/src/video_core/pica/packed_attribute.h b/src/video_core/pica/packed_attribute.h index 0e6e716e0..7c8028e38 100644 --- a/src/video_core/pica/packed_attribute.h +++ b/src/video_core/pica/packed_attribute.h @@ -65,8 +65,8 @@ private: private: template void serialize(Archive& ar, const u32) { - ar& buffer; - ar& index; + ar & buffer; + ar & index; } friend class boost::serialization::access; }; diff --git a/src/video_core/pica/pica_core.cpp b/src/video_core/pica/pica_core.cpp index 6450e669b..243626a87 100644 --- a/src/video_core/pica/pica_core.cpp +++ b/src/video_core/pica/pica_core.cpp @@ -31,9 +31,8 @@ union CommandHeader { static_assert(sizeof(CommandHeader) == sizeof(u32), "CommandHeader has incorrect size!"); PicaCore::PicaCore(Memory::MemorySystem& memory_, std::shared_ptr debug_context_) - : memory{memory_}, debug_context{std::move(debug_context_)}, geometry_pipeline{regs.internal, - gs_unit, - gs_setup}, + : memory{memory_}, debug_context{std::move(debug_context_)}, + geometry_pipeline{regs.internal, gs_unit, gs_setup}, shader_engine{CreateEngine(Settings::values.use_shader_jit.GetValue())} { InitializeRegs(); @@ -613,9 +612,9 @@ void PicaCore::LoadVertices(bool is_indexed) { template void PicaCore::CommandList::serialize(Archive& ar, const u32 file_version) { - ar& addr; - ar& length; - ar& current_index; + ar & addr; + ar & length; + ar & current_index; if (Archive::is_loading::value) { const u8* ptr = Core::System::GetInstance().Memory().GetPhysicalPointer(addr); head = reinterpret_cast(ptr); diff --git a/src/video_core/pica/pica_core.h b/src/video_core/pica/pica_core.h index cfd43f5a6..f2af318c7 100644 --- a/src/video_core/pica/pica_core.h +++ b/src/video_core/pica/pica_core.h @@ -109,10 +109,10 @@ public: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& input_vertex; - ar& current_attribute; - ar& reset_geometry_pipeline; - ar& queue; + ar & input_vertex; + ar & current_attribute; + ar & reset_geometry_pipeline; + ar & queue; } }; @@ -199,7 +199,7 @@ public: template void serialize(Archive& ar, const u32 file_version) { - ar& raw; + ar & raw; } }; @@ -256,19 +256,19 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& regs_lcd; - ar& regs.reg_array; - ar& gs_unit; - ar& vs_setup; - ar& gs_setup; - ar& proctex; - ar& lighting; - ar& fog; - ar& input_default_attributes; - ar& immediate; - ar& geometry_pipeline; - ar& primitive_assembler; - ar& cmd_list; + ar & regs_lcd; + ar & regs.reg_array; + ar & gs_unit; + ar & vs_setup; + ar & gs_setup; + ar & proctex; + ar & lighting; + ar & fog; + ar & input_default_attributes; + ar & immediate; + ar & geometry_pipeline; + ar & primitive_assembler; + ar & cmd_list; } private: diff --git a/src/video_core/pica/primitive_assembly.h b/src/video_core/pica/primitive_assembly.h index dc900749e..133d2bce3 100644 --- a/src/video_core/pica/primitive_assembly.h +++ b/src/video_core/pica/primitive_assembly.h @@ -80,11 +80,11 @@ private: template void serialize(Archive& ar, const unsigned int version) { - ar& topology; - ar& buffer_index; - ar& buffer; - ar& strip_ready; - ar& winding; + ar & topology; + ar & buffer_index; + ar & buffer; + ar & strip_ready; + ar & winding; } friend class boost::serialization::access; }; diff --git a/src/video_core/pica/regs_lcd.h b/src/video_core/pica/regs_lcd.h index 7848b0aad..933842a6c 100644 --- a/src/video_core/pica/regs_lcd.h +++ b/src/video_core/pica/regs_lcd.h @@ -56,10 +56,10 @@ struct RegsLcd { private: template void serialize(Archive& ar, const unsigned int) { - ar& color_fill_top.raw; - ar& backlight_top; - ar& color_fill_bottom.raw; - ar& backlight_bottom; + ar & color_fill_top.raw; + ar & backlight_top; + ar & color_fill_bottom.raw; + ar & backlight_bottom; } friend class boost::serialization::access; }; diff --git a/src/video_core/pica/shader_setup.h b/src/video_core/pica/shader_setup.h index 2df6ccdf4..196d528bf 100644 --- a/src/video_core/pica/shader_setup.h +++ b/src/video_core/pica/shader_setup.h @@ -38,9 +38,9 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& f; - ar& b; - ar& i; + ar & f; + ar & b; + ar & i; } }; @@ -90,14 +90,14 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& uniforms; - ar& uniform_queue; - ar& program_code; - ar& swizzle_data; - ar& program_code_hash_dirty; - ar& swizzle_data_hash_dirty; - ar& program_code_hash; - ar& swizzle_data_hash; + ar & uniforms; + ar & uniform_queue; + ar & program_code; + ar & swizzle_data; + ar & program_code_hash_dirty; + ar & swizzle_data_hash_dirty; + ar & program_code_hash; + ar & swizzle_data_hash; } }; diff --git a/src/video_core/pica/shader_unit.h b/src/video_core/pica/shader_unit.h index 4fa9a1496..12d533d16 100644 --- a/src/video_core/pica/shader_unit.h +++ b/src/video_core/pica/shader_unit.h @@ -57,11 +57,11 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& input; - ar& temporary; - ar& output; - ar& conditional_code; - ar& address_registers; + ar & input; + ar & temporary; + ar & output; + ar & conditional_code; + ar & address_registers; } }; @@ -86,11 +86,11 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const u32 file_version) { - ar& buffer; - ar& vertex_id; - ar& prim_emit; - ar& winding; - ar& output_mask; + ar & buffer; + ar & vertex_id; + ar & prim_emit; + ar & winding; + ar & output_mask; } }; @@ -113,7 +113,7 @@ private: template void serialize(Archive& ar, const u32 file_version) { ar& boost::serialization::base_object(*this); - ar& emitter; + ar & emitter; } }; diff --git a/src/video_core/pica_types.h b/src/video_core/pica_types.h index 4fd27f9fe..02641ba69 100644 --- a/src/video_core/pica_types.h +++ b/src/video_core/pica_types.h @@ -149,7 +149,7 @@ private: friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int file_version) { - ar& value; + ar & value; } }; diff --git a/src/video_core/renderer_opengl/gl_blit_helper.cpp b/src/video_core/renderer_opengl/gl_blit_helper.cpp index 73484894b..64ae2c1fd 100644 --- a/src/video_core/renderer_opengl/gl_blit_helper.cpp +++ b/src/video_core/renderer_opengl/gl_blit_helper.cpp @@ -55,12 +55,12 @@ OGLProgram CreateProgram(std::string_view frag) { BlitHelper::BlitHelper(const Driver& driver_) : driver{driver_}, linear_sampler{CreateSampler(GL_LINEAR)}, - nearest_sampler{CreateSampler(GL_NEAREST)}, bicubic_program{CreateProgram( - HostShaders::BICUBIC_FRAG)}, + nearest_sampler{CreateSampler(GL_NEAREST)}, + bicubic_program{CreateProgram(HostShaders::BICUBIC_FRAG)}, scale_force_program{CreateProgram(HostShaders::SCALE_FORCE_FRAG)}, xbrz_program{CreateProgram(HostShaders::XBRZ_FREESCALE_FRAG)}, - mmpx_program{CreateProgram(HostShaders::MMPX_FRAG)}, gradient_x_program{CreateProgram( - HostShaders::X_GRADIENT_FRAG)}, + mmpx_program{CreateProgram(HostShaders::MMPX_FRAG)}, + gradient_x_program{CreateProgram(HostShaders::X_GRADIENT_FRAG)}, gradient_y_program{CreateProgram(HostShaders::Y_GRADIENT_FRAG)}, refine_program{CreateProgram(HostShaders::REFINE_FRAG)}, d24s8_to_rgba8{CreateProgram(HostShaders::D24S8_TO_RGBA8_FRAG)}, diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 0487905de..b89f6588e 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -79,13 +79,12 @@ RasterizerOpenGL::RasterizerOpenGL(Memory::MemorySystem& memory, Pica::PicaCore& : VideoCore::RasterizerAccelerated{memory, pica}, driver{driver_}, shader_manager{renderer.GetRenderWindow(), driver, !driver.IsOpenGLES()}, runtime{driver, renderer}, res_cache{memory, custom_tex_manager, runtime, regs, renderer}, - texture_buffer_size{TextureBufferSize()}, vertex_buffer{driver, GL_ARRAY_BUFFER, - VERTEX_BUFFER_SIZE}, + texture_buffer_size{TextureBufferSize()}, + vertex_buffer{driver, GL_ARRAY_BUFFER, VERTEX_BUFFER_SIZE}, uniform_buffer{driver, GL_UNIFORM_BUFFER, UNIFORM_BUFFER_SIZE}, index_buffer{driver, GL_ELEMENT_ARRAY_BUFFER, INDEX_BUFFER_SIZE}, - texture_buffer{driver, GL_TEXTURE_BUFFER, texture_buffer_size}, texture_lf_buffer{ - driver, GL_TEXTURE_BUFFER, - texture_buffer_size} { + texture_buffer{driver, GL_TEXTURE_BUFFER, texture_buffer_size}, + texture_lf_buffer{driver, GL_TEXTURE_BUFFER, texture_buffer_size} { // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0 state.clip_distance[0] = true; @@ -965,10 +964,9 @@ void RasterizerOpenGL::SyncAndUploadLUTsLF() { if (fs_uniform_block_data.fog_lut_dirty || invalidate) { std::array new_data; - std::transform(pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(), - [](const auto& entry) { - return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; - }); + std::transform( + pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(), + [](const auto& entry) { return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; }); if (new_data != fog_lut_data || invalidate) { fog_lut_data = new_data; diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index d9747ebfd..b446d42b5 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -331,8 +331,8 @@ public: ShaderProgramManager::ShaderProgramManager(Frontend::EmuWindow& emu_window_, const Driver& driver_, bool separable) : emu_window{emu_window_}, driver{driver_}, - strict_context_required{emu_window.StrictContextRequired()}, impl{std::make_unique( - driver_, separable)} {} + strict_context_required{emu_window.StrictContextRequired()}, + impl{std::make_unique(driver_, separable)} {} ShaderProgramManager::~ShaderProgramManager() = default; diff --git a/src/video_core/renderer_opengl/gl_texture_runtime.cpp b/src/video_core/renderer_opengl/gl_texture_runtime.cpp index f24fe10ac..01f3b8553 100644 --- a/src/video_core/renderer_opengl/gl_texture_runtime.cpp +++ b/src/video_core/renderer_opengl/gl_texture_runtime.cpp @@ -599,8 +599,8 @@ void Surface::BlitScale(const VideoCore::TextureBlit& blit, bool up_scale) { Framebuffer::Framebuffer(TextureRuntime& runtime, const VideoCore::FramebufferParams& params, const Surface* color, const Surface* depth) - : VideoCore::FramebufferParams{params}, res_scale{color ? color->res_scale - : (depth ? depth->res_scale : 1u)} { + : VideoCore::FramebufferParams{params}, + res_scale{color ? color->res_scale : (depth ? depth->res_scale : 1u)} { if (shadow_rendering && !color) { return; diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index ce6cf5386..7a35fcae1 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -75,9 +75,8 @@ static std::array MakeOrthographicMatrix(const float width, cons RendererOpenGL::RendererOpenGL(Core::System& system, Pica::PicaCore& pica_, Frontend::EmuWindow& window, Frontend::EmuWindow* secondary_window) : VideoCore::RendererBase{system, window, secondary_window}, pica{pica_}, - rasterizer{system.Memory(), pica, system.CustomTexManager(), *this, driver}, frame_dumper{ - system, - window} { + rasterizer{system.Memory(), pica, system.CustomTexManager(), *this, driver}, + frame_dumper{system, window} { const bool has_debug_tool = driver.HasDebugTool(); window.mailbox = std::make_unique(has_debug_tool); if (secondary_window) { diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 98f8b23f2..9da4ebe61 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -54,8 +54,8 @@ RendererVulkan::RendererVulkan(Core::System& system, Pica::PicaCore& pica_, Frontend::EmuWindow& window, Frontend::EmuWindow* secondary_window) : RendererBase{system, window, secondary_window}, memory{system.Memory()}, pica{pica_}, instance{window, Settings::values.physical_device.GetValue()}, scheduler{instance}, - renderpass_cache{instance, scheduler}, pool{instance}, main_window{window, instance, - scheduler}, + renderpass_cache{instance, scheduler}, pool{instance}, + main_window{window, instance, scheduler}, vertex_buffer{instance, scheduler, vk::BufferUsageFlagBits::eVertexBuffer, VERTEX_BUFFER_SIZE}, rasterizer{memory, diff --git a/src/video_core/renderer_vulkan/vk_instance.cpp b/src/video_core/renderer_vulkan/vk_instance.cpp index 8f77f25e0..9f366307b 100644 --- a/src/video_core/renderer_vulkan/vk_instance.cpp +++ b/src/video_core/renderer_vulkan/vk_instance.cpp @@ -132,16 +132,16 @@ std::string GetReadableVersion(u32 version) { } // Anonymous namespace Instance::Instance(bool enable_validation, bool dump_command_buffers) - : library{OpenLibrary()}, instance{CreateInstance(*library, - Frontend::WindowSystemType::Headless, - enable_validation, dump_command_buffers)}, + : library{OpenLibrary()}, + instance{CreateInstance(*library, Frontend::WindowSystemType::Headless, enable_validation, + dump_command_buffers)}, physical_devices{instance->enumeratePhysicalDevices()} {} Instance::Instance(Frontend::EmuWindow& window, u32 physical_device_index) - : library{OpenLibrary(&window)}, instance{CreateInstance( - *library, window.GetWindowInfo().type, - Settings::values.renderer_debug.GetValue(), - Settings::values.dump_command_buffers.GetValue())}, + : library{OpenLibrary(&window)}, + instance{CreateInstance(*library, window.GetWindowInfo().type, + Settings::values.renderer_debug.GetValue(), + Settings::values.dump_command_buffers.GetValue())}, debug_callback{CreateDebugCallback(*instance, debug_utils_supported)}, physical_devices{instance->enumeratePhysicalDevices()} { const std::size_t num_physical_devices = static_cast(physical_devices.size()); diff --git a/src/video_core/renderer_vulkan/vk_present_window.cpp b/src/video_core/renderer_vulkan/vk_present_window.cpp index 5f096ad4b..c8a6d3da4 100644 --- a/src/video_core/renderer_vulkan/vk_present_window.cpp +++ b/src/video_core/renderer_vulkan/vk_present_window.cpp @@ -100,9 +100,9 @@ bool CanBlitToSwapchain(const vk::PhysicalDevice& physical_device, vk::Format fo PresentWindow::PresentWindow(Frontend::EmuWindow& emu_window_, const Instance& instance_, Scheduler& scheduler_) : emu_window{emu_window_}, instance{instance_}, scheduler{scheduler_}, - surface{CreateSurface(instance.GetInstance(), emu_window)}, - next_surface{surface}, swapchain{instance, emu_window.GetFramebufferLayout().width, - emu_window.GetFramebufferLayout().height, surface}, + surface{CreateSurface(instance.GetInstance(), emu_window)}, next_surface{surface}, + swapchain{instance, emu_window.GetFramebufferLayout().width, + emu_window.GetFramebufferLayout().height, surface}, graphics_queue{instance.GetGraphicsQueue()}, present_renderpass{CreateRenderpass()}, vsync_enabled{Settings::values.use_vsync_new.GetValue()}, blit_supported{ diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 0208c8cde..e8a0f8ed5 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -61,8 +61,8 @@ RasterizerVulkan::RasterizerVulkan(Memory::MemorySystem& memory, Pica::PicaCore& Scheduler& scheduler, DescriptorPool& pool, RenderpassCache& renderpass_cache, u32 image_count) : RasterizerAccelerated{memory, pica}, instance{instance}, scheduler{scheduler}, - renderpass_cache{renderpass_cache}, pipeline_cache{instance, scheduler, renderpass_cache, - pool}, + renderpass_cache{renderpass_cache}, + pipeline_cache{instance, scheduler, renderpass_cache, pool}, runtime{instance, scheduler, renderpass_cache, pool, pipeline_cache.TextureProvider(), image_count}, res_cache{memory, custom_tex_manager, runtime, regs, renderer}, @@ -958,10 +958,9 @@ void RasterizerVulkan::SyncAndUploadLUTsLF() { if (fs_uniform_block_data.fog_lut_dirty || invalidate) { std::array new_data; - std::transform(pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(), - [](const auto& entry) { - return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; - }); + std::transform( + pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(), + [](const auto& entry) { return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; }); if (new_data != fog_lut_data || invalidate) { fog_lut_data = new_data; diff --git a/src/video_core/renderer_vulkan/vk_texture_runtime.cpp b/src/video_core/renderer_vulkan/vk_texture_runtime.cpp index 2db1a9c39..1fc7b5152 100644 --- a/src/video_core/renderer_vulkan/vk_texture_runtime.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_runtime.cpp @@ -1458,8 +1458,8 @@ void Surface::BlitScale(const VideoCore::TextureBlit& blit, bool up_scale) { Framebuffer::Framebuffer(TextureRuntime& runtime, const VideoCore::FramebufferParams& params, Surface* color, Surface* depth) - : VideoCore::FramebufferParams{params}, res_scale{color ? color->res_scale - : (depth ? depth->res_scale : 1u)} { + : VideoCore::FramebufferParams{params}, + res_scale{color ? color->res_scale : (depth ? depth->res_scale : 1u)} { auto& renderpass_cache = runtime.GetRenderpassCache(); if (shadow_rendering && !color) { return; @@ -1552,8 +1552,8 @@ Sampler::Sampler(TextureRuntime& runtime, const VideoCore::SamplerParams& params Sampler::~Sampler() = default; DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f color, std::string_view label) - : scheduler{runtime.GetScheduler()}, has_debug_tool{ - runtime.GetInstance().HasDebuggingToolAttached()} { + : scheduler{runtime.GetScheduler()}, + has_debug_tool{runtime.GetInstance().HasDebuggingToolAttached()} { if (!has_debug_tool) { return; } From 106a4a2ef4e677f4fcb4e7ccfa87c2604f74993c Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 15 Apr 2024 22:08:29 +0100 Subject: [PATCH 4/5] Fix compile errors on Clang 18 --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58759df08..8bda0be14 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,7 +117,7 @@ else() if (NOT CMAKE_BUILD_TYPE STREQUAL Debug) # _FORTIFY_SOURCE can't be used without optimizations. - add_compile_options(-Wp,-D_FORTIFY_SOURCE=2) + add_compile_options(-D_FORTIFY_SOURCE=2) endif() if (CITRA_WARNINGS_AS_ERRORS) From ea0b627dc411061bc1f20efa5e75bb8a005eb38e Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 15 Apr 2024 22:47:18 +0100 Subject: [PATCH 5/5] Merged linux-fresh and linux-appimage build envs --- .ci/linux.sh | 4 +++- .github/workflows/build.yml | 2 +- .github/workflows/format.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/linux.sh b/.ci/linux.sh index a9755ff34..a059f9220 100755 --- a/.ci/linux.sh +++ b/.ci/linux.sh @@ -2,7 +2,7 @@ if [ "$TARGET" = "appimage" ]; then # Compile the AppImage we distribute with Clang. - export EXTRA_CMAKE_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld) + export EXTRA_CMAKE_FLAGS=(-DCMAKE_LINKER=/etc/bin/ld.lld) else # For the linux-fresh verification target, verify compilation without PCH as well. export EXTRA_CMAKE_FLAGS=(-DCITRA_USE_PRECOMPILED_HEADERS=OFF) @@ -13,6 +13,8 @@ cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER=clang++-18 \ + -DCMAKE_C_COMPILER=clang-18 \ "${EXTRA_CMAKE_FLAGS[@]}" \ -DENABLE_QT_TRANSLATION=ON \ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ccd5d5b7..1b7e2cd3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: matrix: target: ["appimage", "fresh"] container: - image: opensauce04/lime3ds-build:linux-${{ matrix.target }} + image: opensauce04/lime3ds-build:latest options: -u 1001 env: CCACHE_DIR: ${{ github.workspace }}/.ccache diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 5b3beb43c..7529290d7 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -10,7 +10,7 @@ jobs: clang-format: runs-on: ubuntu-latest container: - image: opensauce04/lime3ds-build:linux-fresh + image: opensauce04/lime3ds-build:latest options: -u 1001 steps: - uses: actions/checkout@v4