diff --git a/rpcs3/Emu/Audio/AudioDumper.h b/rpcs3/Emu/Audio/AudioDumper.h index ebdef123c4..35382b91bf 100644 --- a/rpcs3/Emu/Audio/AudioDumper.h +++ b/rpcs3/Emu/Audio/AudioDumper.h @@ -71,5 +71,5 @@ public: ~AudioDumper(); void WriteData(const void* buffer, u32 size); - const u16 GetCh() const { return m_header.FMT.NumChannels; } + u16 GetCh() const { return m_header.FMT.NumChannels; } }; diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index f5e86dd62c..3abc2a1fb1 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -97,7 +97,7 @@ DECLARE(spu_runtime::tr_interpreter) = [] DECLARE(spu_runtime::g_dispatcher) = [] { // Allocate 2^20 positions in data area - const auto ptr = reinterpret_cast(jit_runtime::alloc(sizeof(*g_dispatcher), 64, false)); + const auto ptr = reinterpret_cast>(jit_runtime::alloc(sizeof(*g_dispatcher), 64, false)); for (auto& x : *ptr) { diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index 63c5467ab5..f742ddb45f 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -3037,12 +3037,12 @@ namespace rsx } } - virtual const u32 get_unreleased_textures_count() const + virtual u32 get_unreleased_textures_count() const { return m_storage.m_unreleased_texture_objects; } - const u64 get_texture_memory_in_use() const + u64 get_texture_memory_in_use() const { return m_storage.m_texture_memory_in_use; } diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.cpp b/rpcs3/Emu/RSX/VK/VKHelpers.cpp index ae0cdc8ce9..db337ce87e 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.cpp +++ b/rpcs3/Emu/RSX/VK/VKHelpers.cpp @@ -255,12 +255,12 @@ namespace vk g_num_total_frames++; } - const u64 get_current_frame_id() + u64 get_current_frame_id() { return g_num_total_frames; } - const u64 get_last_completed_frame_id() + u64 get_last_completed_frame_id() { return (g_num_processed_frames > 0)? g_num_processed_frames - 1: 0; } diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h index f5883598a2..b2b854e693 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.h +++ b/rpcs3/Emu/RSX/VK/VKHelpers.h @@ -106,8 +106,8 @@ namespace vk void advance_completed_frame_counter(); void advance_frame_counter(); - const u64 get_current_frame_id(); - const u64 get_last_completed_frame_id(); + u64 get_current_frame_id(); + u64 get_last_completed_frame_id(); // Handle unexpected submit with dangling occlusion query // TODO: Move queries out of the renderer! diff --git a/rpcs3/Emu/RSX/VK/VKTextureCache.h b/rpcs3/Emu/RSX/VK/VKTextureCache.h index 62aa0b11f9..9b7a101777 100644 --- a/rpcs3/Emu/RSX/VK/VKTextureCache.h +++ b/rpcs3/Emu/RSX/VK/VKTextureCache.h @@ -366,7 +366,7 @@ namespace vk block_size = tex.get_section_size(); } - const bool test(u64 ref_frame) const + bool test(u64 ref_frame) const { return ref_frame > 0 && frame_tag <= ref_frame; } @@ -1258,12 +1258,12 @@ namespace vk return false; } - const u32 get_unreleased_textures_count() const override + u32 get_unreleased_textures_count() const override { return baseclass::get_unreleased_textures_count() + ::size32(m_temporary_storage); } - const u32 get_temporary_memory_in_use() + u32 get_temporary_memory_in_use() { return m_temporary_memory_size; } diff --git a/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp b/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp index 31fa05fe43..4ce4680f08 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp +++ b/rpcs3/Emu/RSX/VK/vkutils/swapchain.hpp @@ -117,12 +117,12 @@ namespace vk return dev; } - const VkFormat get_surface_format() + VkFormat get_surface_format() { return m_surface_format; } - const bool is_headless() const + bool is_headless() const { return (dev.get_present_queue() == VK_NULL_HANDLE); } diff --git a/rpcs3/Emu/RSX/rsx_utils.h b/rpcs3/Emu/RSX/rsx_utils.h index 865474e174..f81292eb98 100644 --- a/rpcs3/Emu/RSX/rsx_utils.h +++ b/rpcs3/Emu/RSX/rsx_utils.h @@ -578,12 +578,12 @@ namespace rsx } } - static inline const f32 get_resolution_scale() + static inline f32 get_resolution_scale() { return g_cfg.video.strict_rendering_mode ? 1.f : (g_cfg.video.resolution_scale_percent / 100.f); } - static inline const int get_resolution_scale_percent() + static inline int get_resolution_scale_percent() { return g_cfg.video.strict_rendering_mode ? 100 : g_cfg.video.resolution_scale_percent; } @@ -951,8 +951,8 @@ namespace rsx struct simple_array { public: - using iterator = Ty * ; - using const_iterator = Ty * const; + using iterator = Ty*; + using const_iterator = const Ty*; private: u32 _capacity = 0; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 123c8159d3..ed0029530a 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -465,7 +465,7 @@ namespace }; } -const bool Emulator::SetUsr(const std::string& user) +bool Emulator::SetUsr(const std::string& user) { if (user.empty()) { @@ -485,7 +485,7 @@ const bool Emulator::SetUsr(const std::string& user) return true; } -const std::string Emulator::GetBackgroundPicturePath() const +std::string Emulator::GetBackgroundPicturePath() const { // Try to find a custom icon first std::string path = fs::get_config_dir() + "/Icons/game_icons/" + Emu.GetTitleID() + "/PIC1.PNG"; @@ -1661,7 +1661,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool extern const std::map g_prx_list; - // Check if there are any firmware SPRX which may be LLEd during emulation + // Check if there are any firmware SPRX which may be LLEd during emulation // Don't prompt GUI confirmation if there aren't any if (std::any_of(g_prx_list.begin(), g_prx_list.end(), [&libs](auto& lib) { diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index b62ceff7b9..a1722ee812 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -192,14 +192,14 @@ public: } // u32 for cell. - const u32 GetUsrId() const + u32 GetUsrId() const { return m_usrid; } - const bool SetUsr(const std::string& user); + bool SetUsr(const std::string& user); - const std::string GetBackgroundPicturePath() const; + std::string GetBackgroundPicturePath() const; u64 GetPauseTime() { diff --git a/rpcs3/cmake_modules/ConfigureCompiler.cmake b/rpcs3/cmake_modules/ConfigureCompiler.cmake index bc10dfa600..41c13c5d23 100644 --- a/rpcs3/cmake_modules/ConfigureCompiler.cmake +++ b/rpcs3/cmake_modules/ConfigureCompiler.cmake @@ -33,6 +33,8 @@ else() add_compile_options(-Werror=return-type) add_compile_options(-Werror=overloaded-virtual) add_compile_options(-Wunused-parameter) + add_compile_options(-Wignored-qualifiers) + #add_compile_options(-Wdeprecated-copy) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Werror=inconsistent-missing-override)