diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-19 16:59:40 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-19 17:07:46 +0400 |
commit | d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6 (patch) | |
tree | a99079bda02a9d8dd5bd0d54666164f362314c52 /starmath | |
parent | ST_InfoListReader and ST_InfoListWriter seem to be unused (diff) | |
download | core-d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6.tar.gz core-d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6.zip |
Get rid of size() == 0
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/cursor.cxx | 6 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 2 | ||||
-rw-r--r-- | starmath/source/parse.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index c2d7f4f8498e..684521fef6a6 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -298,7 +298,7 @@ void SmCursor::Delete(){ } void SmCursor::InsertNodes(SmNodeList* pNewNodes){ - if(pNewNodes->size() == 0){ + if(pNewNodes->empty()){ delete pNewNodes; return; } @@ -702,7 +702,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) { //If there's no selected nodes, create a place node SmNode *pBodyNode; SmCaretPos PosAfterInsert; - if(pSelectedNodesList->size() == 0) { + if(pSelectedNodesList->empty()) { pBodyNode = new SmPlaceNode(); PosAfterInsert = SmCaretPos(pBodyNode, 1); } else @@ -871,7 +871,7 @@ bool SmCursor::InsertRow() { it = pLineList->end(); if(it != pLineList->begin()) --it; - if(pNewLineList->size() == 0) + if(pNewLineList->empty()) pNewLineList->push_front(new SmPlaceNode()); //Parse new line SmNode *pNewLine = SmNodeListParser().Parse(pNewLineList); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index bc9037b43b1f..33feb52ed13f 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1291,7 +1291,7 @@ void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol) if (nSymbol < aSymbolSet.size()) nSelectSymbol = nSymbol; - if (aSymbolSet.size() == 0) + if (aSymbolSet.empty()) nSelectSymbol = SYMBOL_NONE; if (nSelectSymbol != SYMBOL_NONE) diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 787695685f58..9b7c2a5650ab 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -1112,7 +1112,7 @@ void SmParser::Line() //If there's no expression, add an empty one. //this is to avoid a formula tree without any caret //positions, in visual formula editor. - if(ExpressionArray.size() == 0) + if(ExpressionArray.empty()) ExpressionArray.push_back(new SmExpressionNode(SmToken())); SmStructureNode *pSNode = new SmLineNode(m_aCurToken); |