summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-21 10:21:01 +0200
committerNoel Grandin <noel@peralex.com>2013-10-23 08:29:15 +0200
commit7a06928bcf638e1eeedebc9d53c306a1b852cc9b (patch)
treec0402c2da4e2c522ecf32a0b413128f727cbc0fa /starmath
parenta55d02bacb2c8f21cba759c8fe3931df07a85b0c (diff)
convert code to use OUString::endsWith
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 2e631e207f5a..d8832a583d9e 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -802,8 +802,8 @@ void SmExpressionNode::CreateTextFromNode(OUString &rText)
pNode->CreateTextFromNode(rText);
//Just a bit of foo to make unary +asd -asd +-asd -+asd look nice
if (pNode->GetType() == NMATH)
- if ((nSize != 2) || ((rText[rText.getLength()-1] != '+') &&
- (rText[rText.getLength()-1] != '-')))
+ if ((nSize != 2) ||
+ ( !rText.endsWith("+") && !rText.endsWith("-") ))
rText += " ";
}