summaryrefslogtreecommitdiff
path: root/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx')
-rw-r--r--i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
index f466cf9d2693..0be8c094c876 100644
--- a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
+++ b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx
@@ -21,6 +21,8 @@
#include <transliteration_Ignore.hxx>
+#include <numeric>
+
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -72,13 +74,10 @@ ignoreIandEfollowedByYa_ja_JP::foldingImpl( const OUString& inStr, sal_Int32 sta
sal_Unicode * dst = newStr->buffer;
const sal_Unicode * src = inStr.getStr() + startPos;
- sal_Int32 *p = nullptr;
- sal_Int32 position = 0;
if (useOffset) {
// Allocate nCount length to offset argument.
offset.realloc( nCount );
- p = offset.getArray();
- position = startPos;
+ std::iota(offset.begin(), offset.end(), startPos);
}
@@ -96,10 +95,6 @@ ignoreIandEfollowedByYa_ja_JP::foldingImpl( const OUString& inStr, sal_Int32 sta
if (currentChar == 0x30E3 || // KATAKANA LETTER SMALL YA
currentChar == 0x30E4) { // KATAKANA LETTER YA
if (aTable[ previousChar ] != previousChar) {
- if (useOffset) {
- *p ++ = position++;
- *p ++ = position++;
- }
*dst ++ = previousChar;
*dst ++ = 0x30A2; // KATAKANA LETTER A
previousChar = *src ++;
@@ -108,15 +103,11 @@ ignoreIandEfollowedByYa_ja_JP::foldingImpl( const OUString& inStr, sal_Int32 sta
}
}
- if (useOffset)
- *p ++ = position++;
*dst ++ = previousChar;
previousChar = currentChar;
}
if (nCount == 0) {
- if (useOffset)
- *p = position;
*dst ++ = previousChar;
}