summaryrefslogtreecommitdiff
path: root/starmath/source/cursor.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-04-14 12:19:04 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2017-04-14 06:20:15 +0200
commit222cf76001d835961537214eba38037ef40a8aa0 (patch)
treef947474d33c391b780877a1f0829cf487a512033 /starmath/source/cursor.cxx
parentb7b159d79c2b4ec53915e0b9c3e28912c289a5ba (diff)
starmath: size() > 0 -> !empty()
Change-Id: Id7c73870f58ebf04c2703cdf8b3d0ffe258b2c0d Reviewed-on: https://gerrit.libreoffice.org/36545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r--starmath/source/cursor.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 86c345d28935..b077f5980133 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -517,7 +517,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
//Find node that this should be applied to
SmNode* pSubject;
- bool bPatchLine = pSelectedNodesList->size() > 0; //If the line should be patched later
+ bool bPatchLine = !pSelectedNodesList->empty(); //If the line should be patched later
if(it != pLineList->begin()) {
--it;
pSubject = *it;
@@ -569,7 +569,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
//Find caret pos, that should be used after sub-/superscription.
SmCaretPos PosAfterScript; //Leave invalid for first position
- if(pScriptLineList->size() > 0)
+ if (!pScriptLineList->empty())
PosAfterScript = SmCaretPos::GetPosAfter(pScriptLineList->back());
//Parse pScriptLineList
@@ -629,7 +629,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup) {
} else {
pLine = pSubSup->GetSubSup(eSubSup);
SmNodeList* pLineList = NodeToList(pLine);
- if(pLineList->size() > 0)
+ if (!pLineList->empty())
PosAfterLimit = SmCaretPos::GetPosAfter(pLineList->back());
pLine = SmNodeListParser().Parse(pLineList);
delete pLineList;
@@ -1147,7 +1147,7 @@ void SmCursor::Copy(){
}
//Set clipboard
- if (aClipboard.size() > 0)
+ if (!aClipboard.empty())
maClipboard = std::move(aClipboard);
}
@@ -1155,7 +1155,7 @@ void SmCursor::Paste() {
BeginEdit();
Delete();
- if(maClipboard.size() > 0)
+ if (!maClipboard.empty())
InsertNodes(CloneList(maClipboard));
EndEdit();