summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsole.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-03 14:34:17 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-06 08:34:00 +0000
commit43af54c2282a433f53675604cf76b646ae241a1c (patch)
treeccdfe840c7bef35cb3b3e2dd570d74d63bf73b4e /src/plugins/platforms/windows/qwindowsole.cpp
parent67b296e249883e559bab7edcd8360ca702e18fe9 (diff)
Windows QPA: Fix some clang-tidy-warnings
- Replace index-based loops by range-based for - Change else if to if after return/break/continue or simplify - Fix indentation - Do not check for non-null before invoking delete on pointer - Use isEmpty() instead size() to check for empty containers - Remove C-style casts - Use raw string literal - Do not repeat type in return, use {} instead - Reference local variables by const ref where applicable Change-Id: I5cc4b4026a10bddb561ba1ba8ec137e0d4119f94 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsole.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsole.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsole.cpp b/src/plugins/platforms/windows/qwindowsole.cpp
index 3e62bbdeca..5ecdf46cea 100644
--- a/src/plugins/platforms/windows/qwindowsole.cpp
+++ b/src/plugins/platforms/windows/qwindowsole.cpp
@@ -365,10 +365,9 @@ QWindowsOleEnumFmtEtc::Clone(LPENUMFORMATETC FAR* newEnum)
if (result->isNull()) {
delete result;
return ResultFromScode(E_OUTOFMEMORY);
- } else {
- *newEnum = result;
}
+ *newEnum = result;
return NOERROR;
}