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/transliteration/transliteration_body.cxx | |
parent | these don't actually take ownership, just copy and leak original (diff) | |
download | core-23854ea235ef32232f34c6ff121f005310f8c01b.tar.gz core-23854ea235ef32232f34c6ff121f005310f8c01b.zip |
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/transliteration/transliteration_body.cxx')
-rw-r--r-- | i18npool/source/transliteration/transliteration_body.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 84ae11349a32..294f0a1f89a9 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -129,7 +129,7 @@ Transliteration_body::transliterate( const Mapping &map = casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType ); nOffCount += map.nmap; } - rtl_uString* pStr = x_rtl_uString_new_WithLength( nOffCount, 1 ); // our x_rtl_ustring.h + rtl_uString* pStr = x_rtl_uString_new_WithLength(nOffCount); sal_Unicode* out = pStr->buffer; if ( nOffCount != offset.getLength() ) @@ -199,7 +199,7 @@ OUString SAL_CALL Transliteration_body::transliterateChar2String( sal_Unicode inChar ) throw(RuntimeException) { const Mapping &map = casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType); - rtl_uString* pStr = x_rtl_uString_new_WithLength( map.nmap, 1 ); // our x_rtl_ustring.h + rtl_uString* pStr = x_rtl_uString_new_WithLength(map.nmap); sal_Unicode* out = pStr->buffer; sal_Int32 i; |