diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:04:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:21 +0100 |
commit | f462f7b8a341c3252edfd7b4808e99c8e72244c4 (patch) | |
tree | a8b15f13d6660883357b4d73601a289fac9298ea /i18npool | |
parent | 33815ec44937f731ce3de9146a97265662d0d206 (diff) |
Clean up C-style casts from pointers to void
Change-Id: I59b111341fc8153088882ac24322f714dc69417a
Diffstat (limited to 'i18npool')
4 files changed, 6 insertions, 6 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx b/i18npool/source/breakiterator/breakiterator_ctl.cxx index 2f8703c9d038..8a4593238dd8 100644 --- a/i18npool/source/breakiterator/breakiterator_ctl.cxx +++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx @@ -37,8 +37,8 @@ BreakIterator_CTL::BreakIterator_CTL() : { cBreakIterator = "com.sun.star.i18n.BreakIterator_CTL"; // to improve performance, alloc big enough memory in construct. - nextCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); - previousCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); + nextCellIndex = static_cast<sal_Int32*>(calloc(cellIndexSize, sizeof(sal_Int32))); + previousCellIndex = static_cast<sal_Int32*>(calloc(cellIndexSize, sizeof(sal_Int32))); } /** diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx index e350fdce1c4c..17a51ea61924 100644 --- a/i18npool/source/breakiterator/breakiterator_th.cxx +++ b/i18npool/source/breakiterator/breakiterator_th.cxx @@ -112,8 +112,8 @@ void SAL_CALL BreakIterator_th::makeIndex(const OUString& Text, sal_Int32 nStart cellIndexSize = cachedText.getLength(); free(nextCellIndex); free(previousCellIndex); - nextCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); - previousCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); + nextCellIndex = static_cast<sal_Int32*>(calloc(cellIndexSize, sizeof(sal_Int32))); + previousCellIndex = static_cast<sal_Int32*>(calloc(cellIndexSize, sizeof(sal_Int32))); } // reset nextCell for new Text memset(nextCellIndex, 0, cellIndexSize * sizeof(sal_Int32)); diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 56da33bc5784..7fccfb4e1cfd 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -93,7 +93,7 @@ void IndexTable::init(sal_Unicode start_, sal_Unicode end_, IndexKey *keys, sal_ { start=start_; end=end_; - table = (sal_uInt8*) malloc((end-start+1)*sizeof(sal_uInt8)); + table = static_cast<sal_uInt8*>(malloc((end-start+1)*sizeof(sal_uInt8))); for (sal_Unicode i = start; i <= end; i++) { sal_Int16 j; for (j = 0; j < key_count; j++) { diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx index 2cde35accbbf..c7538ee25004 100644 --- a/i18npool/source/textconversion/genconv_dict.cxx +++ b/i18npool/source/textconversion/genconv_dict.cxx @@ -332,7 +332,7 @@ typedef struct { extern "C" { int Index_comp(const void* s1, const void* s2) { - Index *p1 = (Index*)s1, *p2 = (Index*)s2; + Index const *p1 = static_cast<Index const *>(s1), *p2 = static_cast<Index const *>(s2); int result = p1->len - p2->len; for (int i = 0; result == 0 && i < p1->len; i++) result = *(p1->data+i) - *(p2->data+i); |