summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2015-12-19 15:18:01 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-07 12:18:40 +0000
commit5e0d36adc3f7f245edfc79230d0871017ba15d5d (patch)
treeb26f52373a20adb65041a79da23803503abad030 /basic/source/comp
parenta8b10c2841bf38e0f4393594de9b61d9bd3cd842 (diff)
BASIC : use std::vector instead of SbArray for Modules.
Change-Id: I9594efb13b3dccc637ccd61eea4b42255c2a775c Reviewed-on: https://gerrit.libreoffice.org/20817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/exprnode.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 9d77f6dba071..19272dc3da6a 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -19,6 +19,7 @@
#include <math.h>
+#include <algorithm>
#include <rtl/math.hxx>
#include "codegen.hxx"
@@ -191,9 +192,7 @@ short SbiExprNode::GetDepth()
if( IsOperand() ) return 0;
else
{
- short d1 = pLeft->GetDepth();
- short d2 = pRight->GetDepth();
- return( (d1 < d2 ) ? d2 : d1 ) + 1;
+ return std::max(pLeft->GetDepth(), pRight->GetDepth()) + 1;
}
}