diff --git a/externals/tinyxml/tinyxml2.cpp b/externals/tinyxml/tinyxml2.cpp index 2d3a1f7c11c..d6028185d8f 100644 --- a/externals/tinyxml/tinyxml2.cpp +++ b/externals/tinyxml/tinyxml2.cpp @@ -670,8 +670,9 @@ void XMLNode::DeleteChild( XMLNode* node ) XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) { TIXMLASSERT( addThis ); - if ( addThis->_document != _document ) { - TIXMLASSERT( false ); + bool isOtherDocument = (addThis->_document != _document); + if ( isOtherDocument ) { + TIXMLASSERT( !isOtherDocument ); //assure a false ASSERT return 0; } @@ -704,8 +705,9 @@ XMLNode* XMLNode::InsertEndChild( XMLNode* addThis ) XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) { TIXMLASSERT( addThis ); - if ( addThis->_document != _document ) { - TIXMLASSERT( false ); + bool isOtherDocument = (addThis->_document != _document); + if (isOtherDocument) { + TIXMLASSERT(!isOtherDocument); //assure a false ASSERT return 0; } @@ -739,15 +741,16 @@ XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis ) XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) { TIXMLASSERT( addThis ); - if ( addThis->_document != _document ) { - TIXMLASSERT( false ); + bool isOtherDocument = (addThis->_document != _document); + if (isOtherDocument) { + TIXMLASSERT(!isOtherDocument); //assure a false ASSERT return 0; } TIXMLASSERT( afterThis ); - - if ( afterThis->_parent != this ) { - TIXMLASSERT( false ); + isOtherDocument = (afterThis->_parent != this ); + if (isOtherDocument) { + TIXMLASSERT(!isOtherDocument); //assure a false ASSERT return 0; } diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 8b4dab26930..b40cd6e244e 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3213,7 +3213,7 @@ bool Tokenizer::simplifySizeof() if (Token::Match(decltok,"%name% [") && Token::simpleMatch(decltok->linkAt(1), "] [")) { const Token *tok2 = decltok->linkAt(1); while (Token::Match(tok2, "] [ %num% ]")) { - sz = sz * MathLib::toLongNumber(tok2->strAt(2)); + sz = sz * static_cast( MathLib::toLongNumber(tok2->strAt(2)) ); tok2 = tok2->linkAt(3); } if (Token::simpleMatch(tok2, "] ["))