From 77cb644f90817cee4e5b9401f2165921ddd65d13 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 14 Jan 2019 17:56:05 +0200 Subject: [PATCH] Refactoring. Fixing static analyzers warnings. --HG-- branch : develop --- src/libs/ifc/xml/vpatternconverter.cpp | 6 +++--- src/libs/vmisc/def.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index d3295e172..d5b7bc9be 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -165,7 +165,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, strUserDefined, (QLatin1String("userDef Q_GLOBAL_STATIC_WITH_ARGS(const QString, strPlacement, (QLatin1String("placement"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, strCutNumber, (QLatin1String("cutNumber"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, strQuantity, (QLatin1String("quantity"))) -} +} // anonymous namespace //--------------------------------------------------------------------------------------------------------------------- VPatternConverter::VPatternConverter(const QString &fileName) @@ -1090,12 +1090,12 @@ QSet VPatternConverter::FixIncrementsToV0_2_0() QSet names; const QDomElement incr = TagIncrementsV0_1_4(); QDomNode domNode = incr.firstChild(); - while (domNode.isNull() == false) + while (not domNode.isNull()) { if (domNode.isElement()) { QDomElement domElement = domNode.toElement(); - if (domElement.isNull() == false) + if (not domElement.isNull()) { if (domElement.tagName() == *strIncrement) { diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 044a51cb6..db6a8fd11 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -322,7 +322,7 @@ enum class GSizes : unsigned char { ALL, # define __has_cpp_attribute(x) 0 #endif -#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) +#if __cplusplus >= 201703L && __has_cpp_attribute(fallthrough) # define V_FALLTHROUGH [[fallthrough]]; #elif defined(Q_CC_CLANG) && __cplusplus >= 201103L /* clang's fallthrough annotations are only available starting in C++11. */