summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2015-12-06 14:29:18 +0100
committerArnaud Versini <arnaud.versini@libreoffice.org>2015-12-13 15:57:42 +0000
commit4df183e2c9c548ecdd6f3421d9ef043194aa0981 (patch)
tree73d1389ba1de313648325fe300b9f428bc5b1413 /basic/source/comp
parentfdf122378d5dfa7160fa29eace026424b125e3e4 (diff)
BASIC: use c++ foreach loops when possible.
Change-Id: Ia1c734e26da88010eef40a4375c423b0765f43ae Reviewed-on: https://gerrit.libreoffice.org/20423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/exprgen.cxx5
-rw-r--r--basic/source/comp/exprnode.cxx5
2 files changed, 3 insertions, 7 deletions
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index c1c74a0b2121..ce6ff9363174 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -191,11 +191,8 @@ void SbiExprNode::GenElement( SbiCodeGen& rGen, SbiOpcode eOp )
if( aVar.pvMorePar )
{
- SbiExprListVector* pvMorePar = aVar.pvMorePar;
- SbiExprListVector::iterator it;
- for( it = pvMorePar->begin() ; it != pvMorePar->end() ; ++it )
+ for( auto& pExprList: *aVar.pvMorePar )
{
- SbiExprList* pExprList = *it;
pExprList->Gen();
rGen.Gen( _ARRAYACCESS );
}
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 3bd9693e58b0..52c2211fcfa3 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -111,9 +111,8 @@ SbiExprNode::~SbiExprNode()
SbiExprListVector* pvMorePar = aVar.pvMorePar;
if( pvMorePar )
{
- SbiExprListVector::iterator it;
- for( it = pvMorePar->begin() ; it != pvMorePar->end() ; ++it )
- delete *it;
+ for( const auto& pParam : *pvMorePar )
+ delete pParam;
delete pvMorePar;
}
}