From ff0be5aba1c12be49b305e596a7610d197ca8427 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 18 Jul 2018 14:59:09 +0200 Subject: Fix some clang-tidy warnings in shiboken - 'else if' after return/break/continue - Use const ref for complex arguments passed by value where possible - Fix 'if (foo) delete foo' to 'delete foo' - Use container.isEmpty() instead of container.size() in checks - Use ' = default' for trivial constructors/destructors - Use range based for where possible - Complete constructor initializer lists - Fix invocations of static methods - Replace some reinterpret_cast by static_cast - Remove unused variables/fields - Use initializer lists for return types Change-Id: Id5b44a2f9d429f66ef069d532a1cd31df796d38e Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/include.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/include.cpp') diff --git a/sources/shiboken2/ApiExtractor/include.cpp b/sources/shiboken2/ApiExtractor/include.cpp index 963999b9d..d6a451992 100644 --- a/sources/shiboken2/ApiExtractor/include.cpp +++ b/sources/shiboken2/ApiExtractor/include.cpp @@ -36,10 +36,9 @@ QString Include::toString() const { if (m_type == IncludePath) return QLatin1String("#include <") + m_name + QLatin1Char('>'); - else if (m_type == LocalPath) + if (m_type == LocalPath) return QLatin1String("#include \"") + m_name + QLatin1Char('"'); - else - return QLatin1String("import ") + m_name + QLatin1Char(';'); + return QLatin1String("import ") + m_name + QLatin1Char(';'); } uint qHash(const Include& inc) -- cgit v1.2.3