fixes compile errors
authorPeng Wu <alexepico@gmail.com>
Wed, 25 Aug 2010 09:53:07 +0000 (17:53 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 25 Aug 2010 09:53:07 +0000 (17:53 +0800)
src/storage/Makefile.am
src/storage/phrase_large_table.cpp
src/storage/phrase_large_table.h

index adf2b5c..2ffcfbd 100644 (file)
@@ -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
 
index 6c6dc3c..a033cee 100644 (file)
@@ -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){
     
 }
index 007c392..3c140b9 100644 (file)
@@ -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);