diff options
author | Peng Wu <alexepico@gmail.com> | 2010-08-25 17:53:07 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-08-25 17:53:07 +0800 |
commit | c7232e9e4545596913892f478405b8e8febc6e4b (patch) | |
tree | 20da49323bac546fe082220ae62d155f21f6927b /src | |
parent | 5b86b689d2bdf08778888d05faa9babe39d91464 (diff) | |
download | libpinyin-c7232e9e4545596913892f478405b8e8febc6e4b.tar.gz libpinyin-c7232e9e4545596913892f478405b8e8febc6e4b.tar.xz libpinyin-c7232e9e4545596913892f478405b8e8febc6e4b.zip |
fixes compile errors
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/Makefile.am | 2 | ||||
-rw-r--r-- | src/storage/phrase_large_table.cpp | 6 | ||||
-rw-r--r-- | src/storage/phrase_large_table.h | 8 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am index adf2b5c..2ffcfbd 100644 --- a/src/storage/Makefile.am +++ b/src/storage/Makefile.am @@ -24,6 +24,7 @@ noinst_HEADERS = pinyin_large_table.h \ pinyin_phrase.h \ phrase_index.h \ pinyin_zhuyin_map_data.h \ + phrase_large_table.h \ ngram.h noinst_LTLIBRARIES = libstorage.la @@ -31,5 +32,6 @@ noinst_LTLIBRARIES = libstorage.la libstorage_la_SOURCES = pinyin_base.cpp \ pinyin_large_table.cpp \ phrase_index.cpp \ + phrase_large_table.cpp \ ngram.cpp diff --git a/src/storage/phrase_large_table.cpp b/src/storage/phrase_large_table.cpp index 6c6dc3c..a033cee 100644 --- a/src/storage/phrase_large_table.cpp +++ b/src/storage/phrase_large_table.cpp @@ -28,7 +28,7 @@ PhraseBitmapIndexLevel::PhraseBitmapIndexLevel(){ } void PhraseBitmapIndexLevel::reset(){ - for ( int i = 0; i < PHRASE_Number_Of_Bitmap_Index; i++){ + for ( size_t i = 0; i < PHRASE_Number_Of_Bitmap_Index; i++){ PhraseLengthIndexLevel * length_array = m_phrase_length_indexes[i]; if ( length_array ) @@ -62,7 +62,7 @@ PhraseLengthIndexLevel::~PhraseLengthIndexLevel(){ break; \ } - for ( int i = 0 ; i < m_phrase_array_indexes->len; ++i){ + for ( size_t i = 0 ; i < m_phrase_array_indexes->len; ++i){ switch (i){ CASE(0); CASE(1); @@ -131,6 +131,6 @@ int PhraseLengthIndexLevel::search(int phrase_length, } template<size_t phrase_length> -int PinyinArrayIndexLevel<phrase_length>::search(/* in */ utf16_t phrase[], /* out */ phrase_token_t & token){ +int PhraseArrayIndexLevel<phrase_length>::search(/* in */ utf16_t phrase[], /* out */ phrase_token_t & token){ } diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h index 007c392..3c140b9 100644 --- a/src/storage/phrase_large_table.h +++ b/src/storage/phrase_large_table.h @@ -28,7 +28,7 @@ namespace novel{ -const size_t PHRASE_Number_Of_Bitmap_Index = 1<< (sizeof(utf16_t) * 8); +const size_t PHRASE_Number_Of_Bitmap_Index = 1<<(sizeof(utf16_t) * 8); class PhraseLengthIndexLevel; @@ -39,7 +39,7 @@ protected: void reset(); public: PhraseBitmapIndexLevel(); - ~PhraseBitmapIndex(){ + ~PhraseBitmapIndexLevel(){ reset(); } @@ -59,6 +59,10 @@ class PhraseLengthIndexLevel{ protected: GArray* m_phrase_array_indexes; public: + PhraseLengthIndexLevel(); + ~PhraseLengthIndexLevel(); + + /* load/store method */ bool load(MemoryChunk * chunk, table_offset_t offset, table_offset_t end); bool store(MemoryChunk * new_chunk, table_offset_t offset, table_offset_t & end); |