diff options
author | 2014-06-24 06:18:11 +0000 | |
---|---|---|
committer | 2014-06-24 06:18:11 +0000 | |
commit | c1ded3dd79f08d94789ea7191342c6fc83df021c (patch) | |
tree | 9752f80961ebc343a277246925255f6c6e988415 /native/jni/src/utils/char_utils.h | |
parent | 03404d559c9b6bbdd043f1ad316b5ae343bc42d1 (diff) | |
parent | 702e153fbc28d54aeb2ded40b9f3f31c1fd154e9 (diff) | |
download | latinime-c1ded3dd79f08d94789ea7191342c6fc83df021c.tar.gz latinime-c1ded3dd79f08d94789ea7191342c6fc83df021c.tar.xz latinime-c1ded3dd79f08d94789ea7191342c6fc83df021c.zip |
am 702e153f: Merge "Support migration/dump of Beginning-of-Sentence entries."
* commit '702e153fbc28d54aeb2ded40b9f3f31c1fd154e9':
Support migration/dump of Beginning-of-Sentence entries.
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; |