summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-06 20:30:04 +0200
committerLioncash <mathew1800@gmail.com>2018-08-06 21:42:44 +0200
commit96b6ad11c1695ff6feec0be2c7d341b112b47bea (patch)
tree7cffce0d216f42ccfdab3eaaf962671dc2f929a0 /src
parentqt/main: Collapse if statement in UpdateRecentFiles() (diff)
downloadyuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar.gz
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar.bz2
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar.lz
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar.xz
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.tar.zst
yuzu-96b6ad11c1695ff6feec0be2c7d341b112b47bea.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 66e4ed5ba..c1e86202f 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -81,6 +81,8 @@ static void ShowCalloutMessage(const QString& message, CalloutFlag flag) {
void GMainWindow::ShowCallouts() {}
+const int GMainWindow::max_recent_files_item;
+
GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
debug_context = Tegra::DebugContext::Construct();
@@ -579,11 +581,11 @@ void GMainWindow::StoreRecentFile(const QString& filename) {
}
void GMainWindow::UpdateRecentFiles() {
- unsigned int num_recent_files =
- std::min(UISettings::values.recent_files.size(), static_cast<int>(max_recent_files_item));
+ const int num_recent_files =
+ std::min(UISettings::values.recent_files.size(), max_recent_files_item);
- for (unsigned int i = 0; i < num_recent_files; i++) {
- QString text = QString("&%1. %2").arg(i + 1).arg(
+ for (int i = 0; i < num_recent_files; i++) {
+ const QString text = QString("&%1. %2").arg(i + 1).arg(
QFileInfo(UISettings::values.recent_files[i]).fileName());
actions_recent_files[i]->setText(text);
actions_recent_files[i]->setData(UISettings::values.recent_files[i]);