summaryrefslogtreecommitdiff
path: root/idlc/source/astscope.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:47:41 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:47:41 +0000
commit6c4f95e1a5e6973fc711d47c39340e5ac4c7bc29 (patch)
tree4ae4f7a23a0a10f9785c3a8f3b29fb30421c0db2 /idlc/source/astscope.cxx
parentce4cbe9f098164cd87f0980183182c7fd3f6e61e (diff)
INTEGRATION: CWS warnings01 (1.9.30); FILE MERGED
2005/11/21 16:28:40 sb 1.9.30.4: #i53898# Made code warning-free. 2005/09/23 00:04:27 sb 1.9.30.3: RESYNC: (1.9-1.10); FILE MERGED 2005/09/05 12:26:06 sb 1.9.30.2: #i53898# Made code warning-free. 2005/08/29 14:14:24 sb 1.9.30.1: #i53898# Made code warning-free.
Diffstat (limited to 'idlc/source/astscope.cxx')
-rw-r--r--idlc/source/astscope.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index 399f1db4a3ed..e1f12d3e6e59 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: astscope.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 18:08:30 $
+ * last change: $Author: hr $ $Date: 2006-06-20 03:47:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -194,19 +194,19 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
if ( bFindFirstScope && (firstScope != scopedName) )
{
- sal_Int32 nIndex = 0;
+ sal_Int32 i = 0;
sal_Int32 nOffset = 2;
do
{
pScope = declAsScope(pDecl);
if( pScope )
{
- pDecl = pScope->lookupByNameLocal(scopedName.getToken(nOffset, ':', nIndex ));
+ pDecl = pScope->lookupByNameLocal(scopedName.getToken(nOffset, ':', i ));
nOffset = 1;
}
if( !pDecl )
break;
- } while( nIndex != -1 );
+ } while( i != -1 );
if ( !pDecl )
{
@@ -246,7 +246,6 @@ AstDeclaration* AstScope::lookupByNameLocal(const OString& name) const
AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
{
- AstDeclaration* pDecl = NULL;
AstInterface* pInterface = (AstInterface*)this;
if ( !pInterface )
@@ -266,9 +265,11 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
while ( iter != end )
{
AstInterface const * resolved = iter->getResolved();
- if ( pDecl = resolved->lookupByNameLocal(scopedName) )
+ AstDeclaration* pDecl = resolved->lookupByNameLocal(scopedName);
+ if ( pDecl )
return pDecl;
- if ( pDecl = resolved->lookupInInherited(scopedName) )
+ pDecl = resolved->lookupInInherited(scopedName);
+ if ( pDecl )
return pDecl;
++iter;
}
@@ -291,6 +292,9 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type)
switch (type)
{
+ case ET_none:
+ OSL_ASSERT(false);
+ break;
case ET_short:
typeName = OString("short");
break;