aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-14 02:22:08 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-14 02:22:08 -0700
commit7e1160c6c52835c46b19eba8f31fa717f3cb0a74 (patch)
treedbdb5353f585b264f115479535308fa8e1d704ee /native/jni/src
parent082baf61727b1ba72618ea58505b927aff0fc6ce (diff)
parent6c2c1a04f17c38b47ddd6878c54a4fb5c98ed970 (diff)
downloadlatinime-7e1160c6c52835c46b19eba8f31fa717f3cb0a74.tar.gz
latinime-7e1160c6c52835c46b19eba8f31fa717f3cb0a74.tar.xz
latinime-7e1160c6c52835c46b19eba8f31fa717f3cb0a74.zip
am 6c2c1a04: am 54035065: Merge "A couple of cleanups. Remove unnecessary casts." into jb-mr1-dev
* commit '6c2c1a04f17c38b47ddd6878c54a4fb5c98ed970': A couple of cleanups. Remove unnecessary casts.
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;