summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-28 21:23:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-28 21:24:44 +0000
commit8f0a740bd6ab84c7d95944b448b4ade4f2ce3e89 (patch)
tree7e87e9804d5b5700dfba7d184fedad126a89e516 /starmath
parent4e2d22bc92d85aa7b3b490c295f3f9d969d6fe33 (diff)
ofz#4733: align size types
Change-Id: I43d136b131ba43401871a6afa455386f050d6c1e
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlimport.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 270388d0258b..0caa425e8cba 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2646,10 +2646,10 @@ void SmXMLTableContext_Impl::EndElement()
SmNodeStack aReverseStack;
aExpressionArray.resize(rNodeStack.size()-nElementCount);
- auto nRows = rNodeStack.size()-nElementCount;
- sal_uInt16 nCols = 0;
+ size_t nRows = rNodeStack.size()-nElementCount;
+ size_t nCols = 0;
- for (auto i=nRows;i > 0;i--)
+ for (size_t i = nRows; i > 0; --i)
{
SmNode* pArray = rNodeStack.front().release();
rNodeStack.pop_front();
@@ -2672,8 +2672,7 @@ void SmXMLTableContext_Impl::EndElement()
pArray = pExprNode;
}
- if (pArray->GetNumSubNodes() > nCols)
- nCols = pArray->GetNumSubNodes();
+ nCols = std::max(nCols, pArray->GetNumSubNodes());
aReverseStack.push_front(std::unique_ptr<SmNode>(pArray));
}
aExpressionArray.resize(nCols*nRows);