diff --git a/src/common/types.h b/src/common/types.h index c7fbc52e5..e65f7e161 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -24,9 +24,7 @@ // unreferenced parameter macro #ifndef UNREFERENCED_VARIABLE -#if defined(_MSC_VER) -#define UNREFERENCED_VARIABLE(P) (P) -#elif defined(__GNUC__) || defined(__clang__) || defined(__EMSCRIPTEN__) +#if defined(__GNUC__) || defined(__clang__) || defined(__EMSCRIPTEN__) #define UNREFERENCED_VARIABLE(P) (void)(P) #else #define UNREFERENCED_VARIABLE(P) (P) diff --git a/src/core/cdrom_async_reader.h b/src/core/cdrom_async_reader.h index c98c84921..89f44c604 100644 --- a/src/core/cdrom_async_reader.h +++ b/src/core/cdrom_async_reader.h @@ -24,7 +24,7 @@ public: CDROMAsyncReader(); ~CDROMAsyncReader(); - const CDImage::LBA GetLastReadSector() const { return m_buffers[m_buffer_front.load()].lba; } + CDImage::LBA GetLastReadSector() const { return m_buffers[m_buffer_front.load()].lba; } const SectorBuffer& GetSectorBuffer() const { return m_buffers[m_buffer_front.load()].data; } const CDImage::SubChannelQ& GetSectorSubQ() const { return m_buffers[m_buffer_front.load()].subq; } u32 GetBufferedSectorCount() const { return m_buffer_count.load(); } diff --git a/src/core/cpu_code_cache.h b/src/core/cpu_code_cache.h index b2a8b2820..221bee207 100644 --- a/src/core/cpu_code_cache.h +++ b/src/core/cpu_code_cache.h @@ -94,10 +94,10 @@ struct CodeBlock u32 recompile_count = 0; u32 invalidate_frame_number = 0; - const u32 GetPC() const { return key.GetPC(); } - const u32 GetSizeInBytes() const { return static_cast(instructions.size()) * sizeof(Instruction); } - const u32 GetStartPageIndex() const { return (key.GetPCPhysicalAddress() / HOST_PAGE_SIZE); } - const u32 GetEndPageIndex() const { return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE); } + u32 GetPC() const { return key.GetPC(); } + u32 GetSizeInBytes() const { return static_cast(instructions.size()) * sizeof(Instruction); } + u32 GetStartPageIndex() const { return (key.GetPCPhysicalAddress() / HOST_PAGE_SIZE); } + u32 GetEndPageIndex() const { return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE); } bool IsInRAM() const { // TODO: Constant diff --git a/src/core/cpu_recompiler_code_generator_x64.cpp b/src/core/cpu_recompiler_code_generator_x64.cpp index b7c0e27c6..d3c3306c6 100644 --- a/src/core/cpu_recompiler_code_generator_x64.cpp +++ b/src/core/cpu_recompiler_code_generator_x64.cpp @@ -317,9 +317,11 @@ void CodeGenerator::EmitSignExtend(HostReg to_reg, RegSize to_size, HostReg from } } break; - } - Panic("Unknown sign-extend combination"); + default: + Panic("Unknown sign-extend combination"); + break; + } } void CodeGenerator::EmitZeroExtend(HostReg to_reg, RegSize to_size, HostReg from_reg, RegSize from_size) diff --git a/src/core/gpu_hw.h b/src/core/gpu_hw.h index a1e7052e6..c42d7a886 100644 --- a/src/core/gpu_hw.h +++ b/src/core/gpu_hw.h @@ -33,7 +33,7 @@ public: GPU_HW(); virtual ~GPU_HW(); - const Threading::Thread* GetSWThread() const; + const Threading::Thread* GetSWThread() const override; virtual bool Initialize() override; virtual void Reset(bool clear_vram) override; diff --git a/src/core/gpu_hw_vulkan.cpp b/src/core/gpu_hw_vulkan.cpp index ab7fc5043..a1bdbe281 100644 --- a/src/core/gpu_hw_vulkan.cpp +++ b/src/core/gpu_hw_vulkan.cpp @@ -798,7 +798,7 @@ void GPU_HW_Vulkan::ClearFramebuffer() m_vram_depth_texture.TransitionToLayout(cmdbuf, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); static constexpr VkClearColorValue cc = {}; - const VkClearDepthStencilValue cds = {m_pgxp_depth_buffer ? 1.0f : 0.0f}; + const VkClearDepthStencilValue cds = {m_pgxp_depth_buffer ? 1.0f : 0.0f, 0u}; static constexpr VkImageSubresourceRange csrr = {VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u}; static constexpr VkImageSubresourceRange dsrr = {VK_IMAGE_ASPECT_DEPTH_BIT, 0u, 1u, 0u, 1u}; vkCmdClearColorImage(cmdbuf, m_vram_texture.GetImage(), m_vram_texture.GetLayout(), &cc, 1u, &csrr); diff --git a/src/core/gpu_sw.h b/src/core/gpu_sw.h index 4b35b9694..0b4f0906d 100644 --- a/src/core/gpu_sw.h +++ b/src/core/gpu_sw.h @@ -23,7 +23,7 @@ public: ALWAYS_INLINE const GPU_SW_Backend& GetBackend() const { return m_backend; } GPURenderer GetRendererType() const override; - const Threading::Thread* GetSWThread() const; + const Threading::Thread* GetSWThread() const override; bool Initialize() override; bool DoState(StateWrapper& sw, HostDisplayTexture** host_texture, bool update_display) override; diff --git a/src/duckstation-qt/cheatmanagerdialog.cpp b/src/duckstation-qt/cheatmanagerdialog.cpp index ab42e655b..7212c3f13 100644 --- a/src/duckstation-qt/cheatmanagerdialog.cpp +++ b/src/duckstation-qt/cheatmanagerdialog.cpp @@ -552,7 +552,7 @@ void CheatManagerDialog::addCodeClicked() group_item->setExpanded(true); Host::RunOnCPUThread( - [this, &new_code]() { + [&new_code]() { System::GetCheatList()->AddCode(std::move(new_code)); System::SaveCheatList(); }, diff --git a/src/frontend-common/d3d12_host_display.h b/src/frontend-common/d3d12_host_display.h index 2af6dfcd2..fee706330 100644 --- a/src/frontend-common/d3d12_host_display.h +++ b/src/frontend-common/d3d12_host_display.h @@ -86,8 +86,8 @@ protected: virtual bool CreateResources() override; virtual void DestroyResources() override; - virtual bool CreateImGuiContext(); - virtual void DestroyImGuiContext(); + virtual bool CreateImGuiContext() override; + virtual void DestroyImGuiContext() override; virtual bool UpdateImGuiFontTexture() override; bool CreateSwapChain(const DXGI_MODE_DESC* fullscreen_mode); diff --git a/src/frontend-common/postprocessing_chain.h b/src/frontend-common/postprocessing_chain.h index 6f4f9b93c..aa9d5ee9d 100644 --- a/src/frontend-common/postprocessing_chain.h +++ b/src/frontend-common/postprocessing_chain.h @@ -12,7 +12,7 @@ public: ~PostProcessingChain(); ALWAYS_INLINE bool IsEmpty() const { return m_shaders.empty(); } - ALWAYS_INLINE const u32 GetStageCount() const { return static_cast(m_shaders.size()); } + ALWAYS_INLINE u32 GetStageCount() const { return static_cast(m_shaders.size()); } ALWAYS_INLINE const PostProcessingShader& GetShaderStage(u32 i) const { return m_shaders[i]; } ALWAYS_INLINE PostProcessingShader& GetShaderStage(u32 i) { return m_shaders[i]; } diff --git a/src/util/util.props b/src/util/util.props index 5aba0b6d8..9722be154 100644 --- a/src/util/util.props +++ b/src/util/util.props @@ -4,7 +4,7 @@ - %(PreprocessorDefinitions);SOUNDTOUCH_FLOAT_SAMPLES;SOUNDTOUCH_ALLOW_SSE + %(PreprocessorDefinitions);SOUNDTOUCH_FLOAT_SAMPLES;SOUNDTOUCH_ALLOW_SSE;ST_NO_EXCEPTION_HANDLING=1 %(PreprocessorDefinitions);SOUNDTOUCH_USE_NEON $(SolutionDir)dep\soundtouch\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\libchdr\include;%(AdditionalIncludeDirectories)