summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_win.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-29 09:07:43 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-02 12:41:07 +0000
commit7c0884f2a2b02ed91ee49f79ef2fff27c2567c39 (patch)
tree64661ff40d4e36b6320c1bd2ff5d15d56a446875 /src/corelib/io/qfsfileengine_win.cpp
parent30756f4626972d90e1b6e24f495260c1268c9181 (diff)
Windows code: Fix clang-tidy warnings about else after jumps
Replace by switch() where appropriate, remove else and unindent code or simplify the return value. Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qfsfileengine_win.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 9d3bfbba31..c1b8f00b4a 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -766,10 +766,9 @@ QString QFSFileEngine::fileName(FileName file) const
int slash = ret.lastIndexOf(QLatin1Char('/'));
if (slash < 0)
return ret;
- else if (ret.at(0) != QLatin1Char('/') && slash == 2)
+ if (ret.at(0) != QLatin1Char('/') && slash == 2)
return ret.left(3); // include the slash
- else
- return ret.left(slash > 0 ? slash : 1);
+ return ret.left(slash > 0 ? slash : 1);
}
return ret;
} else if (file == CanonicalName || file == CanonicalPathName) {