summaryrefslogtreecommitdiff
path: root/starmath
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
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')
-rw-r--r--starmath/inc/cursor.hxx2
-rw-r--r--starmath/source/cursor.cxx10
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--starmath/source/utility.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 39502ff9dfc5..c499b2a1de7d 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -410,7 +410,7 @@ private:
SmNodeList* pList;
/** Get the current terminal */
SmNode* Terminal(){
- if(pList->size() > 0)
+ if (!pList->empty())
return pList->front();
return nullptr;
}
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();
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 4d7634c83703..43141395ddc6 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1590,7 +1590,7 @@ bool SmSymbolDialog::SelectSymbolSet(const OUString &rSymbolSetName)
} );
m_pSymbolSetDisplay->SetSymbolSet( aSymbolSet );
- if (aSymbolSet.size() > 0)
+ if (!aSymbolSet.empty())
SelectSymbol(0);
bRet = true;
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 6ef71fb55326..0d1df8ba7058 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -153,7 +153,7 @@ SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList)
for (decltype(aFontVec)::size_type nPos = 0; nPos < aFontVec.size(); nPos++)
InsertEntry(lcl_GetStringItem(aFontVec[nPos]), nPos);
- if (aFontVec.size() > 0)
+ if (!aFontVec.empty())
SelectEntry(lcl_GetStringItem(aFontVec.front()));
return *this;