diff options
Diffstat (limited to 'idlc/source/parser.y')
-rw-r--r-- | idlc/source/parser.y | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/idlc/source/parser.y b/idlc/source/parser.y index 6e7bf785154f..5589e7482607 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -445,12 +445,11 @@ module_dcl : AstScope* pScope = idlc()->scopes()->topNonNull(); AstModule* pModule = nullptr; - AstDeclaration* pExists = nullptr; if ( pScope ) { pModule = new AstModule(*$3, pScope); - if( (pExists = pScope->lookupForAdd(pModule)) ) + if( AstDeclaration* pExists = pScope->lookupForAdd(pModule) ) { pExists->setInMainfile(idlc()->isInMainFile()); pExists->setFileName(pModule->getFileName()); @@ -556,7 +555,6 @@ interface_dcl : AstScope* pScope = idlc()->scopes()->topNonNull(); AstInterface* pInterface = nullptr; AstInterface* pForward = nullptr; - AstDeclaration* pDecl = nullptr; /* * Make a new interface node and add it to its enclosing scope @@ -566,7 +564,7 @@ interface_dcl : pInterface = new AstInterface( *$1->getName(), static_cast< AstInterface const * >(resolveTypedefs($1->getInherits())), pScope); - if ( (pDecl = pScope->lookupByName(pInterface->getScopedName())) ) + if ( AstDeclaration* pDecl = pScope->lookupByName(pInterface->getScopedName()) ) { /* * See if we're defining a forward declared interface. @@ -1279,12 +1277,11 @@ constants_dcl : AstScope* pScope = idlc()->scopes()->topNonNull(); AstConstants* pConstants = nullptr; - AstDeclaration* pExists = nullptr; if ( pScope ) { pConstants = new AstConstants(*$3, pScope); - if( (pExists = pScope->lookupForAdd(pConstants)) ) + if( AstDeclaration* pExists = pScope->lookupForAdd(pConstants) ) { pExists->setInMainfile(idlc()->isInMainFile()); delete(pConstants); |