summaryrefslogtreecommitdiffstats
path: root/i18npool/source/collator
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:29:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:31 +0100
commitc3f4909b992735f6a90b97b8019442a8acd12f95 (patch)
treefcf5ba14a2f02018e611bc17ffaa6fee91f3b93c /i18npool/source/collator
parentconst_cast: convert some C-style casts and remove some redundant ones (diff)
downloadcore-c3f4909b992735f6a90b97b8019442a8acd12f95.tar.gz
core-c3f4909b992735f6a90b97b8019442a8acd12f95.zip
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I7b184414d822e7d3f4f7694dcea540d731f970d9
Diffstat (limited to 'i18npool/source/collator')
-rw-r--r--i18npool/source/collator/collatorImpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index fc5b48259575..2c931443a630 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -52,8 +52,8 @@ CollatorImpl::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32
if (cachedItem)
return cachedItem->xC->compareSubstring(str1, off1, len1, str2, off2, len2);
- sal_Unicode *unistr1 = (sal_Unicode*) str1.getStr() + off1;
- sal_Unicode *unistr2 = (sal_Unicode*) str2.getStr() + off2;
+ sal_Unicode *unistr1 = const_cast<sal_Unicode*>(str1.getStr()) + off1;
+ sal_Unicode *unistr2 = const_cast<sal_Unicode*>(str2.getStr()) + off2;
for (int i = 0; i < len1 && i < len2; i++)
if (unistr1[i] != unistr2[i])
return unistr1[i] < unistr2[i] ? -1 : 1;