summaryrefslogtreecommitdiffstats
path: root/idlc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:47:52 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:47:52 +0000
commit740dba21a8877ea0fba79888bdb5bd10f116213e (patch)
treea1122beefa6943be529c92ac6e87b88100871a6c /idlc
parentINTEGRATION: CWS warnings01 (1.9.30); FILE MERGED (diff)
downloadcore-740dba21a8877ea0fba79888bdb5bd10f116213e.tar.gz
core-740dba21a8877ea0fba79888bdb5bd10f116213e.zip
INTEGRATION: CWS warnings01 (1.1.148); FILE MERGED
2005/11/07 12:12:27 sb 1.1.148.3: #i53898# Made code warning-free (additional -W switches for GCC). 2005/09/23 00:04:49 sb 1.1.148.2: RESYNC: (1.1-1.2); FILE MERGED 2005/08/29 14:14:24 sb 1.1.148.1: #i53898# Made code warning-free.
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/aststack.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/idlc/source/aststack.cxx b/idlc/source/aststack.cxx
index 4946f10d7632..9414a40d7d1f 100644
--- a/idlc/source/aststack.cxx
+++ b/idlc/source/aststack.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: aststack.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 18:08:47 $
+ * last change: $Author: hr $ $Date: 2006-06-20 03:47:52 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -45,9 +45,9 @@
#define STACKSIZE_INCREMENT 64
AstStack::AstStack()
- : m_size(STACKSIZE_INCREMENT)
+ : m_stack((AstScope**)rtl_allocateZeroMemory(sizeof(AstScope*) * STACKSIZE_INCREMENT))
+ , m_size(STACKSIZE_INCREMENT)
, m_top(0)
- , m_stack((AstScope**)rtl_allocateZeroMemory(sizeof(AstScope*) * STACKSIZE_INCREMENT))
{
}
@@ -97,10 +97,10 @@ AstScope* AstStack::nextToTop()
AstScope* AstStack::topNonNull()
{
- for (sal_uInt32 i = m_top - 1; i >= 0; i--)
+ for (sal_uInt32 i = m_top; i > 0; i--)
{
- if ( m_stack[i] )
- return m_stack[i];
+ if ( m_stack[i - 1] )
+ return m_stack[i - 1];
}
return NULL;
}