diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 23:00:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-01 09:53:36 +0100 |
commit | 23854ea235ef32232f34c6ff121f005310f8c01b (patch) | |
tree | 82d2ba080d849cc5cdd801c0d98fc1ccd014ea39 /i18npool/source/characterclassification | |
parent | 5e51cc84d9a9885cc081dd409697244dcd7a67c8 (diff) |
refactor x_rtl_uString_new_WithLength to be consistent
i.e. change x_rtl_uString_new_WithLength to always create a rtl_uString
with ref count of 1, like rtl_uString_new_WithLength, so requiring:
either the explicit use of rtl_uString_release or
passing ownership to an OUString via OUString(pStr, SAL_NO_ACQUIRE)
which will do the same in its dtor
Diffstat (limited to 'i18npool/source/characterclassification')
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 2db8575785f1..9acdd9b66d87 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -99,7 +99,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, nCount = len - nPos; trans->setMappingType(MappingTypeToTitle, rLocale); - rtl_uString* pStr = x_rtl_uString_new_WithLength( nCount, 1 ); + rtl_uString* pStr = x_rtl_uString_new_WithLength(nCount); sal_Unicode* out = pStr->buffer; BreakIteratorImpl brk(xMSF); Boundary bdy = brk.getWordBoundary(Text, nPos, rLocale, |