From 740dba21a8877ea0fba79888bdb5bd10f116213e Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 20 Jun 2006 02:47:52 +0000 Subject: 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. --- idlc/source/aststack.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'idlc') 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; } -- cgit