summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-12 23:18:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-14 08:28:29 +0100
commit56c4deae00e42719652b3f8cc3375180d7fd801e (patch)
treefcdff8095ce54578c0471604405f65af602f2848 /starmath
parent8cc6699ade4e1e1b7b00d7034b12c3aec2ed50e9 (diff)
-Werror,-Wtautological-constant-out-of-range-compare
...comparing enum aToken.eType with -1 Change-Id: Ied886e8e455e6deae762da78e366dc12e37a76cf
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlimport.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 6bc1b936ed4a..8ab181ea0e6f 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -795,10 +795,10 @@ void SmXMLContext_Helper::ApplyAttrs()
//StarMath for now.
const SvXMLTokenMap& rTokenMap =
rContext.GetSmImport().GetColorTokenMap();
- aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
- XML_NAMESPACE_MATH, sColor));
- if (aToken.eType != -1)
+ sal_uInt16 tok = rTokenMap.Get(XML_NAMESPACE_MATH, sColor);
+ if (tok != XML_TOK_UNKNOWN)
{
+ aToken.eType = static_cast<SmTokenType>(tok);
SmFontNode *pFontNode = new SmFontNode(aToken);
pFontNode->SetSubNodes(0,lcl_popOrZero(rNodeStack));
rNodeStack.push(pFontNode);