summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-05-18 13:25:06 +0200
committerMichael Stahl <mstahl@redhat.com>2015-05-18 14:49:15 +0200
commit42773c66d0239eccd4ad147c61c931b98fc9f5f0 (patch)
tree02aa47760e2bc204bde07d38be507ba3e84e47e4 /xmloff
parent3ccacb47faa625563f8bf0af8d4c62c1eea6ce7c (diff)
xmloff: convert legacy assertions in xmltoken.cxx
Change-Id: I852e6a6d805cc03920a467bf7f9739181b6c77d4
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmltoken.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index e242f8cc9ef3..b22c1acce855 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3281,11 +3281,11 @@ namespace xmloff { namespace token {
s_bChecked = true; // it's all static, checking once is enough
}
#endif
- DBG_ASSERT( eToken > XML_TOKEN_INVALID, "token value too low!" );
- DBG_ASSERT( eToken < XML_TOKEN_END, "token value too high!" );
- DBG_ASSERT(sal_uInt16(eToken) < sizeof(aTokenList)/sizeof(aTokenList[0]),"Illegal position!");
+ assert(XML_TOKEN_INVALID < eToken);
+ assert(eToken < XML_TOKEN_END);
+ assert(sal_uInt16(eToken) < SAL_N_ELEMENTS(aTokenList));
- XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken];
+ XMLTokenEntry* pToken = &aTokenList[static_cast<sal_uInt16>(eToken)];
if (!pToken->pOUString)
pToken->pOUString = new OUString( pToken->pChar, pToken->nLength,
RTL_TEXTENCODING_ASCII_US );
@@ -3297,8 +3297,8 @@ namespace xmloff { namespace token {
const OUString& rString,
enum XMLTokenEnum eToken )
{
- DBG_ASSERT( eToken > XML_TOKEN_INVALID, "token value too low!" );
- DBG_ASSERT( eToken < XML_TOKEN_END, "token value too high!" );
+ assert(XML_TOKEN_INVALID < eToken);
+ assert(eToken < XML_TOKEN_END);
const XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken];
return rString.equalsAsciiL( pToken->pChar, pToken->nLength );