summaryrefslogtreecommitdiff
authorTing Li <ting.li@amlogic.com>2015-06-05 06:56:48 (GMT)
committer Ting Li <ting.li@amlogic.com>2015-06-05 06:56:48 (GMT)
commit9def86b0e88b8cf283ba618a023dc8ca50249ca4 (patch)
treeff41b1d2aea40bbfc12887c6bb2324754ad5687a
parent0627d4b1ff66ffdc9ca18f0ca28da8ae41cb7b2e (diff)
downloadRemoteIME-9def86b0e88b8cf283ba618a023dc8ca50249ca4.zip
RemoteIME-9def86b0e88b8cf283ba618a023dc8ca50249ca4.tar.gz
RemoteIME-9def86b0e88b8cf283ba618a023dc8ca50249ca4.tar.bz2
fix 64bit load user-dict error
Change-Id: I9a6a3f18cea5f59c31440fc4b47c53817e7305e9
Diffstat
-rw-r--r--[-rwxr-xr-x]jni/include/spellingtable.h2
-rw-r--r--[-rwxr-xr-x]jni/include/spellingtrie.h4
-rw-r--r--[-rwxr-xr-x]jni/share/spellingtrie.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/jni/include/spellingtable.h b/jni/include/spellingtable.h
index c8d8830..b137a8e 100755..100644
--- a/jni/include/spellingtable.h
+++ b/jni/include/spellingtable.h
@@ -50,7 +50,7 @@ namespace ime_pinyin {
// score, an extra char after each spelling string is the score.
// An item with a lower score has a higher probability.
char *spelling_buf_;
- size_t spelling_size_;
+ int spelling_size_;
double total_freq_;
diff --git a/jni/include/spellingtrie.h b/jni/include/spellingtrie.h
index 249e3a5..77f27a1 100755..100644
--- a/jni/include/spellingtrie.h
+++ b/jni/include/spellingtrie.h
@@ -63,10 +63,10 @@ namespace ime_pinyin {
// so spelling_size_ is 8.
// Structure: The string ended with '\0' + score char.
// An item with a lower score has a higher probability.
- size_t spelling_size_;
+ int spelling_size_;
// Number of full spelling ids.
- size_t spelling_num_;
+ int spelling_num_;
float score_amplifier_;
unsigned char average_score_;
diff --git a/jni/share/spellingtrie.cpp b/jni/share/spellingtrie.cpp
index 97bdd2c..0c0dbc1 100755..100644
--- a/jni/share/spellingtrie.cpp
+++ b/jni/share/spellingtrie.cpp
@@ -554,9 +554,9 @@ namespace ime_pinyin {
bool SpellingTrie::save_spl_trie ( FILE *fp ) {
if ( NULL == fp || NULL == spelling_buf_ )
{ return false; }
- if ( fwrite ( &spelling_size_, sizeof ( size_t ), 1, fp ) != 1 )
+ if ( fwrite ( &spelling_size_, sizeof ( int ), 1, fp ) != 1 )
{ return false; }
- if ( fwrite ( &spelling_num_, sizeof ( size_t ), 1, fp ) != 1 )
+ if ( fwrite ( &spelling_num_, sizeof ( int ), 1, fp ) != 1 )
{ return false; }
if ( fwrite ( &score_amplifier_, sizeof ( float ), 1, fp ) != 1 )
{ return false; }