From 3027f9235cf1588bcefcbb5e2c85b0d37fe4b7d3 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 10 Sep 2024 23:53:27 +1000 Subject: [PATCH] Misc: Warning fixes --- src/common/gsvector_sse.h | 5 +++-- src/duckstation-qt/debuggerwindow.cpp | 2 +- src/util/imgui_fullscreen.cpp | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/gsvector_sse.h b/src/common/gsvector_sse.h index a2e6be66f..2957b2495 100644 --- a/src/common/gsvector_sse.h +++ b/src/common/gsvector_sse.h @@ -892,7 +892,7 @@ public: ALWAYS_INLINE bool rempty() const { return lt32(zwzw()).mask() != 0x00ff; } - ALWAYS_INLINE GSVector4i runion(const GSVector4i& v) const { return min_i32(v).upl64(max_i32(v).srl<8>()); } + ALWAYS_INLINE GSVector4i runion(const GSVector4i& v) const { return min_i32(v).blend32<0xc>(max_i32(v)); } ALWAYS_INLINE GSVector4i rintersect(const GSVector4i& v) const { return sat_i32(v); } ALWAYS_INLINE bool rintersects(const GSVector4i& v) const { return !rintersect(v).rempty(); } @@ -1371,7 +1371,8 @@ public: ALWAYS_INLINE static GSVector4i loadnt(const void* p) { - return GSVector4i(_mm_stream_load_si128(static_cast(p))); + // Should be const, but isn't... + return GSVector4i(_mm_stream_load_si128(const_cast<__m128i*>(static_cast(p)))); } ALWAYS_INLINE static GSVector4i load32(const void* p) { return GSVector4i(_mm_loadu_si32(p)); } diff --git a/src/duckstation-qt/debuggerwindow.cpp b/src/duckstation-qt/debuggerwindow.cpp index 1639e87ab..3044429fd 100644 --- a/src/duckstation-qt/debuggerwindow.cpp +++ b/src/duckstation-qt/debuggerwindow.cpp @@ -594,7 +594,7 @@ void DebuggerWindow::setMemoryViewRegion(Bus::MemoryRegion region) void* const mem_ptr = Bus::GetMemoryRegionPointer(region); const bool mem_writable = Bus::IsMemoryRegionWritable(region); const MemoryViewWidget::EditCallback edit_callback = - ((region == Bus::MemoryRegion::RAM) ? edit_ram_callback : nullptr); + ((region == Bus::MemoryRegion::RAM) ? static_cast(edit_ram_callback) : nullptr); m_ui.memoryView->setData(start, mem_ptr, end - start, mem_writable, edit_callback); #define SET_REGION_RADIO_BUTTON(name, rb_region) \ diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index a811c1e60..9d9309cb6 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -917,6 +917,8 @@ void ImGuiFullscreen::BeginMenuButtons(u32 num_items, float y_align, float x_pad case ImGuiDir_Down: ImGui::SetScrollY(std::min(ImGui::GetScrollY() + item_height, ImGui::GetScrollMaxY())); break; + default: + break; } }