aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-14 02:18:25 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-14 02:18:26 -0700
commit54035065c0ba516af408b1a3e12e12b1483ed61a (patch)
tree1f73ed129cda74927362af575d5d64043d37bd1f /native/jni/src
parenta0cd05842e26e802121823a25274190f65a2450f (diff)
parent34710b03e6d890a61c8c570ff9e769493f6955f9 (diff)
downloadlatinime-54035065c0ba516af408b1a3e12e12b1483ed61a.tar.gz
latinime-54035065c0ba516af408b1a3e12e12b1483ed61a.tar.xz
latinime-54035065c0ba516af408b1a3e12e12b1483ed61a.zip
Merge "A couple of cleanups. Remove unnecessary casts." into jb-mr1-dev
Diffstat (limited to 'native/jni/src')
-rw-r--r--native/jni/src/dictionary.h12
-rw-r--r--native/jni/src/words_priority_queue.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/native/jni/src/dictionary.h b/native/jni/src/dictionary.h
index 3b55e5de9..fd9e77011 100644
--- a/native/jni/src/dictionary.h
+++ b/native/jni/src/dictionary.h
@@ -55,11 +55,11 @@ class Dictionary {
int getFrequency(const int32_t *word, int length) const;
bool isValidBigram(const int32_t *word1, int length1, const int32_t *word2, int length2) const;
- void *getDict() const { // required to release dictionary buffer
- return reinterpret_cast<void *>(const_cast<unsigned char *>(mDict));
+ const uint8_t *getDict() const { // required to release dictionary buffer
+ return mDict;
}
- void *getOffsetDict() const {
- return reinterpret_cast<void *>(const_cast<unsigned char *>(mOffsetDict));
+ const uint8_t *getOffsetDict() const {
+ return mOffsetDict;
}
int getDictSize() const { return mDictSize; }
int getMmapFd() const { return mMmapFd; }
@@ -72,8 +72,8 @@ class Dictionary {
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Dictionary);
- const unsigned char *mDict;
- const unsigned char *mOffsetDict;
+ const uint8_t *mDict;
+ const uint8_t *mOffsetDict;
// Used only for the mmap version of dictionary loading, but we use these as dummy variables
// also for the malloc version.
diff --git a/native/jni/src/words_priority_queue.h b/native/jni/src/words_priority_queue.h
index e97e16a12..2fad9bb3d 100644
--- a/native/jni/src/words_priority_queue.h
+++ b/native/jni/src/words_priority_queue.h
@@ -223,7 +223,7 @@ class WordsPriorityQueue {
before, beforeLength, word, wordLength, score);
}
- typedef std::priority_queue<SuggestedWord*, std::vector<SuggestedWord*>,
+ typedef std::priority_queue<SuggestedWord *, std::vector<SuggestedWord *>,
wordComparator> Suggestions;
Suggestions mSuggestions;
const unsigned int MAX_WORDS;