From cff588f1661b1e2e3ffc43e0a1994a200c878377 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 7 Mar 2017 12:09:26 +0100 Subject: [PATCH] #1292 Fixed CppCheck Issues in ProjectDataModel : Added assert Access the variable to silence CppCheck --- Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h index 3251f23bad..007c128703 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h @@ -101,6 +101,7 @@ class PdmObjectCapability; \ static bool chekingThePresenceOfHeaderAndSourceInitMacros = \ Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \ + assert(chekingThePresenceOfHeaderAndSourceInitMacros); \ this->isInheritedFromPdmUiObject(); \ this->isInheritedFromPdmXmlSerializable(); \ \ @@ -119,6 +120,7 @@ class PdmObjectCapability; \ static bool chekingThePresenceOfHeaderAndSourceInitMacros = \ Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \ + assert(chekingThePresenceOfHeaderAndSourceInitMacros); \ this->isInheritedFromPdmUiObject(); \ this->isInheritedFromPdmXmlSerializable(); \ \