From 6149be43cf4613b1fe8c9bdae2172a43c3180963 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 27 Feb 2019 11:29:04 -0500 Subject: [PATCH 1/3] yuzu/compatdb: Remove unused lambda capture Silences a compiler warning with clang. --- src/citra_qt/compatdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citra_qt/compatdb.cpp b/src/citra_qt/compatdb.cpp index 17dd14310..4209b16cf 100644 --- a/src/citra_qt/compatdb.cpp +++ b/src/citra_qt/compatdb.cpp @@ -59,7 +59,7 @@ void CompatDB::Submit() { button(QWizard::CancelButton)->setVisible(false); testcase_watcher.setFuture(QtConcurrent::run( - [this]() { return Core::System::GetInstance().TelemetrySession().SubmitTestcase(); })); + [] { return Core::System::GetInstance().TelemetrySession().SubmitTestcase(); })); break; default: LOG_ERROR(Frontend, "Unexpected page: {}", currentId()); From f322c51a6360cf52a56bf8a27b92df9ab029482b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 27 Feb 2019 08:54:40 -0500 Subject: [PATCH 2/3] core/frontend/emu_window: Make ClipToTouchScreen a const member function This member function doesn't modify instance state, so it can have the const specifier applied to it. --- src/core/frontend/emu_window.cpp | 2 +- src/core/frontend/emu_window.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index fb84eff3a..b932f9d6c 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -75,7 +75,7 @@ static bool IsWithinTouchscreen(const Layout::FramebufferLayout& layout, unsigne } } -std::tuple EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) { +std::tuple EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) const { if (Settings::values.toggle_3d) { if (new_x >= framebuffer_layout.width / 2) new_x -= framebuffer_layout.width / 2; diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 5fefcff54..be3ff589a 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -164,5 +164,5 @@ private: /** * Clip the provided coordinates to be inside the touchscreen area. */ - std::tuple ClipToTouchScreen(unsigned new_x, unsigned new_y); + std::tuple ClipToTouchScreen(unsigned new_x, unsigned new_y) const; }; From d354a2ee3be85d0c2a43dca7b2014baa323dbdf7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 25 Feb 2019 09:24:36 -0500 Subject: [PATCH 3/3] audio_core/codec: Resolve truncation warnings within DecodeADPCM The assignments here were performing an implicit truncation from int to s16. Make it explicit that this is desired behavior. --- src/audio_core/codec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio_core/codec.cpp b/src/audio_core/codec.cpp index d12edef3c..27c5d82e1 100644 --- a/src/audio_core/codec.cpp +++ b/src/audio_core/codec.cpp @@ -72,8 +72,8 @@ StereoBuffer16 DecodeADPCM(const u8* const data, const std::size_t sample_count, } } - state.yn1 = yn1; - state.yn2 = yn2; + state.yn1 = static_cast(yn1); + state.yn2 = static_cast(yn2); return ret; }