Kaydet (Commit) 07a641b1 authored tarafından Takeshi Abe's avatar Takeshi Abe

Reduce scope of variables

Change-Id: I0018a6601f48f32736d10fd1eab58e926d97f91b
Reviewed-on: https://gerrit.libreoffice.org/24458Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst 097bf754
......@@ -1420,8 +1420,7 @@ void SmParser::DoTerm(bool bGroupNumberIdent)
{
// We have several concatenated identifiers and numbers.
// Let's group them into one SmExpressionNode.
SmNodeArray nodeArray;
nodeArray.resize(nTokens);
SmNodeArray nodeArray(nTokens);
while (nTokens > 0)
{
nodeArray[nTokens-1] = popOrZero(m_aNodeStack);
......@@ -2178,7 +2177,6 @@ void SmParser::DoBinom()
void SmParser::DoStack()
{
SmNodeArray ExpressionArray;
NextToken();
if (m_aCurToken.eType == TLGROUP)
{
......@@ -2192,7 +2190,7 @@ void SmParser::DoStack()
}
while (m_aCurToken.eType == TPOUND);
ExpressionArray.resize(n);
SmNodeArray ExpressionArray(n);
for (sal_uInt16 i = 0; i < n; i++)
{
......@@ -2218,8 +2216,6 @@ void SmParser::DoStack()
void SmParser::DoMatrix()
{
SmNodeArray ExpressionArray;
NextToken();
if (m_aCurToken.eType == TLGROUP)
{
......@@ -2257,7 +2253,7 @@ void SmParser::DoMatrix()
size_t nRC = static_cast<size_t>(r) * c;
ExpressionArray.resize(nRC);
SmNodeArray ExpressionArray(nRC);
for (size_t i = 0; i < (nRC); ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment