summaryrefslogtreecommitdiffstats
path: root/i18nutil/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-23 01:18:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-23 10:35:45 +0100
commit7ba337359eaf76b73dfa7828e9efe8850257f9ce (patch)
treeb8a668617faa641a09f6fb8c24b83e0296e8c263 /i18nutil/inc
parentditch deprecated api (diff)
downloadcore-7ba337359eaf76b73dfa7828e9efe8850257f9ce.tar.gz
core-7ba337359eaf76b73dfa7828e9efe8850257f9ce.zip
merge these similar methods together
Diffstat (limited to 'i18nutil/inc')
-rw-r--r--i18nutil/inc/i18nutil/x_rtl_ustring.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/i18nutil/inc/i18nutil/x_rtl_ustring.h b/i18nutil/inc/i18nutil/x_rtl_ustring.h
index 6b644afd1691..848cc9e5eb6e 100644
--- a/i18nutil/inc/i18nutil/x_rtl_ustring.h
+++ b/i18nutil/inc/i18nutil/x_rtl_ustring.h
@@ -28,30 +28,23 @@
#ifndef INCLUDED_I18NUTIL_X_RTL_USTRING_H
#define INCLUDED_I18NUTIL_X_RTL_USTRING_H
-#ifndef _RTL_STRING_HXX_
#include <rtl/strbuf.hxx>
-#endif
#include <rtl/memory.h>
#include <rtl/alloc.h>
#include "i18nutildllapi.h"
/**
- * Allocates a new <code>rtl_uString</code> which can hold nLen + 1 characters.
- * The reference count is 0. The characters of room is not cleared.
- * This method is similar to rtl_uString_new_WithLength in rtl/ustring.h, but
- * can allocate a new string more efficiently. You need to "acquire" by such as
- * OUString( rtl_uString * value ) if you intend to use it for a while.
- * @param [output] newStr
- * @param [input] nLen
+ * Allocates a new <code>rtl_uString</code> with capacity of nLen + 1
+ * characters.
+ *
+ * The reference count is 0. The characters of the capacity are not cleared,
+ * unlike the similar method of rtl_uString_new_WithLength in rtl/ustring.h, so
+ * is more efficient for allocating a new string. You need to "acquire" by such
+ * as OUString( rtl_uString * value ) if you intend to use it for a while.
+ * @param nLen
+ * @return newStr
*/
-I18NUTIL_DLLPUBLIC inline void SAL_CALL x_rtl_uString_new_WithLength( rtl_uString ** newStr, sal_Int32 nLen, sal_Int32 _refCount = 0 )
-{
- *newStr = (rtl_uString*) rtl_allocateMemory ( sizeof(rtl_uString) + sizeof(sal_Unicode) * nLen);
- (*newStr)->refCount = _refCount;
- (*newStr)->length = nLen;
-}
-
I18NUTIL_DLLPUBLIC inline rtl_uString * SAL_CALL x_rtl_uString_new_WithLength( sal_Int32 nLen, sal_Int32 _refCount = 0 )
{
rtl_uString *newStr = (rtl_uString*) rtl_allocateMemory ( sizeof(rtl_uString) + sizeof(sal_Unicode) * nLen);