diff options
author | 2014-06-24 12:37:07 +0900 | |
---|---|---|
committer | 2014-06-24 12:37:07 +0900 | |
commit | 88fa47a27d45f6460971d0d223aa558e121b3478 (patch) | |
tree | 66ec3c729f26a82efdbfc84f6ce838f9b315b5fe /native/jni/src/utils/char_utils.h | |
parent | f7322b166b88f72b19509d8416700d4ec8ea7753 (diff) | |
download | latinime-88fa47a27d45f6460971d0d223aa558e121b3478.tar.gz latinime-88fa47a27d45f6460971d0d223aa558e121b3478.tar.xz latinime-88fa47a27d45f6460971d0d223aa558e121b3478.zip |
Support migration/dump of Beginning-of-Sentence entries.
Bug: 14119293
Change-Id: Ie975138f819794d5c34a7a547be5a6117050e084
Diffstat (limited to 'native/jni/src/utils/char_utils.h')
-rw-r--r-- | native/jni/src/utils/char_utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/native/jni/src/utils/char_utils.h b/native/jni/src/utils/char_utils.h index f28ed5682..63786502b 100644 --- a/native/jni/src/utils/char_utils.h +++ b/native/jni/src/utils/char_utils.h @@ -98,6 +98,10 @@ class CharUtils { // Beginning-of-Sentence. static AK_FORCE_INLINE int attachBeginningOfSentenceMarker(int *const codePoints, const int codePointCount, const int maxCodePoint) { + if (codePointCount > 0 && codePoints[0] == CODE_POINT_BEGINNING_OF_SENTENCE) { + // Marker has already been attached. + return codePointCount; + } if (codePointCount >= maxCodePoint) { // the code points cannot be marked as a Beginning-of-Sentence. return 0; |