From f0f9f344459637e338b441426ccea953b1cc1b77 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Fri, 16 Feb 2018 14:53:38 -0600 Subject: [PATCH] move callback definition outside loop --- src/citra_qt/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index c9b2e7ddf..7eef25c48 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -806,10 +806,10 @@ void GMainWindow::OnMenuInstallCIA() { QtConcurrent::run([&, filepaths] { QString current_path; Service::AM::InstallStatus status; + const auto cia_progress = [&](size_t written, size_t total) { + emit UpdateProgress(written, total); + }; for (int current_index = 0; current_index < filepaths.size(); current_index++) { - const auto cia_progress = [&](size_t written, size_t total) { - emit UpdateProgress(written, total); - }; current_path = filepaths.at(current_index); status = Service::AM::InstallCIA(current_path.toStdString(), cia_progress); emit CIAInstallReport(status, current_path);