From c1c198b84b65ebac576354381c56c45fe18320a7 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Tue, 29 Oct 2024 15:45:30 +0000 Subject: [PATCH] Combine if statements Signed-off-by: TheKodeToad --- launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp index e38ca526f..ead8238ff 100644 --- a/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp +++ b/launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp @@ -168,13 +168,12 @@ void ModrinthCheckUpdate::checkNextLoader() return; } - if (m_loaders_list.size() == 0) { - if (m_loader_idx == 0) { - getUpdateModsForLoader({}); - m_loader_idx++; - return; - } + if (m_loaders_list.isEmpty() && m_loader_idx == 0) { + getUpdateModsForLoader({}); + m_loader_idx++; + return; } + if (m_loader_idx < m_loaders_list.size()) { getUpdateModsForLoader(m_loaders_list.at(m_loader_idx)); m_loader_idx++;