1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From d5f2db39e673f3fde80311a0bb26ae08c02b0074 Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter@kde.org>
Date: Fri, 18 Apr 2025 15:50:18 +0200
Subject: [PATCH] windowswalker: don't else after return
makes things easier to read
---
src/windowsWalker.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/windowsWalker.cpp b/src/windowsWalker.cpp
index b2a79e7f..539c2264 100644
--- a/src/windowsWalker.cpp
+++ b/src/windowsWalker.cpp
@@ -53,15 +53,14 @@ void WindowsWalker::next()
// qDebug() << "no more files";
close();
return;
- } else {
- qWarning() << m_path << ':' << errorCode << GetLastErrorAsString(errorCode);
}
// WARNING: do not access m_fileinfo, it has undefined content!
+ qWarning() << m_path << ':' << errorCode << GetLastErrorAsString(errorCode);
+ continue;
+ }
+
+ if (m_fileinfo.cFileName == std::wstring(L".") || m_fileinfo.cFileName == std::wstring(L"..")) {
continue;
- } else {
- if (m_fileinfo.cFileName == std::wstring(L".") || m_fileinfo.cFileName == std::wstring(L"..")) {
- continue;
- }
}
updateEntry();
--
GitLab
|