From 7c7a41ecd8d1381dac569f1ec60fefaac0ad39a3 Mon Sep 17 00:00:00 2001 From: Jun Su Date: Mon, 23 Mar 2020 14:24:27 +0800 Subject: [PATCH] Cleanup warnings of -Wunused-variable remove unused variables. --- Source/Core/Common/GL/GLContext.cpp | 2 +- Source/Core/DolphinQt/GCMemcardManager.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/GL/GLContext.cpp b/Source/Core/Common/GL/GLContext.cpp index 5d740f9211..d6969bcb55 100644 --- a/Source/Core/Common/GL/GLContext.cpp +++ b/Source/Core/Common/GL/GLContext.cpp @@ -95,9 +95,9 @@ std::unique_ptr GLContext::Create(const WindowSystemInfo& wsi, bool s #if HAVE_X11 if (wsi.type == WindowSystemType::X11) { +#if defined(HAVE_EGL) // GLES 3 is not supported via GLX. const bool use_egl = prefer_egl || prefer_gles; -#if defined(HAVE_EGL) if (use_egl) context = std::make_unique(); else diff --git a/Source/Core/DolphinQt/GCMemcardManager.cpp b/Source/Core/DolphinQt/GCMemcardManager.cpp index 395eb553c6..52c2dcfa35 100644 --- a/Source/Core/DolphinQt/GCMemcardManager.cpp +++ b/Source/Core/DolphinQt/GCMemcardManager.cpp @@ -230,8 +230,6 @@ void GCMemcardManager::UpdateSlotTable(int slot) auto* icon = new QTableWidgetItem; icon->setData(Qt::DecorationRole, icon_data.m_frames[0]); - std::optional entry = memcard->GetDEntry(file_index); - m_slot_active_icons[slot].emplace_back(std::move(icon_data)); table->setItem(i, 0, banner); @@ -531,7 +529,7 @@ GCMemcardManager::IconAnimationData GCMemcardManager::GetIconFromSaveFile(int fi if (decoded_data && !decoded_data->empty()) { frame_data.m_frames.reserve(decoded_data->size()); - const u32 per_frame_offset = MEMORY_CARD_ICON_WIDTH * MEMORY_CARD_ICON_HEIGHT; + for (size_t f = 0; f < decoded_data->size(); ++f) { QImage img(reinterpret_cast((*decoded_data)[f].image_data.data()),