diff options
author | 2013-04-22 18:01:35 +0900 | |
---|---|---|
committer | 2013-04-22 18:30:46 +0900 | |
commit | c9688ef2679699737152ee9f1a2234280a73c1db (patch) | |
tree | 51066393900a64c8ec6164a7c7c0598c797080eb /native/jni/src/binary_format.h | |
parent | 6d25be9ac5e30c956fb7ee3ad43fc67ccbfcb92b (diff) | |
download | latinime-c9688ef2679699737152ee9f1a2234280a73c1db.tar.gz latinime-c9688ef2679699737152ee9f1a2234280a73c1db.tar.xz latinime-c9688ef2679699737152ee9f1a2234280a73c1db.zip |
Fix a small bug
Tests results in Ibcd6c110f1d5582425f9592c42e31152131ef80c
Bug: 7226877
Change-Id: I8d03bae3264974eff7b790e27c073b0a8758d17a
Diffstat (limited to 'native/jni/src/binary_format.h')
-rw-r--r-- | native/jni/src/binary_format.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/native/jni/src/binary_format.h b/native/jni/src/binary_format.h index 2d2e19501..ad16039ef 100644 --- a/native/jni/src/binary_format.h +++ b/native/jni/src/binary_format.h @@ -66,6 +66,7 @@ class BinaryFormat { static int detectFormat(const uint8_t *const dict); static int getHeaderSize(const uint8_t *const dict); static int getFlags(const uint8_t *const dict); + static bool hasBlacklistedOrNotAWordFlag(const int flags); static void readHeaderValue(const uint8_t *const dict, const char *const key, int *outValue, const int outValueSize); static int readHeaderValueInt(const uint8_t *const dict, const char *const key); @@ -162,6 +163,10 @@ inline int BinaryFormat::getFlags(const uint8_t *const dict) { } } +inline bool BinaryFormat::hasBlacklistedOrNotAWordFlag(const int flags) { + return flags & (FLAG_IS_BLACKLISTED | FLAG_IS_NOT_A_WORD); +} + inline int BinaryFormat::getHeaderSize(const uint8_t *const dict) { switch (detectFormat(dict)) { case 1: |