summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-02-17 11:25:20 +0800
committerPeng Wu <alexepico@gmail.com>2012-02-17 11:25:20 +0800
commitba2b7875d9cd8fbed96ee30635cb3de03378454c (patch)
tree13cd88209a37aa1ab98e3adf137edd5f92a02a09
parent36035361995fea3f44f1e1f78a9ac4aabf94290d (diff)
downloadlibpinyin-ba2b7875d9cd8fbed96ee30635cb3de03378454c.zip
libpinyin-ba2b7875d9cd8fbed96ee30635cb3de03378454c.tar.gz
libpinyin-ba2b7875d9cd8fbed96ee30635cb3de03378454c.tar.xz
fixes variable name
-rw-r--r--src/storage/phrase_large_table.cpp10
-rw-r--r--src/storage/phrase_large_table.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/storage/phrase_large_table.cpp b/src/storage/phrase_large_table.cpp
index a353544..b8f3328 100644
--- a/src/storage/phrase_large_table.cpp
+++ b/src/storage/phrase_large_table.cpp
@@ -100,7 +100,7 @@ PhraseBitmapIndexLevel::PhraseBitmapIndexLevel(){
}
void PhraseBitmapIndexLevel::reset(){
- for ( size_t 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 )
@@ -390,7 +390,7 @@ bool PhraseBitmapIndexLevel::load(MemoryChunk * chunk, table_offset_t offset,
table_offset_t * index = (table_offset_t *) (buf_begin + offset);
phrase_end = *index;
- for ( size_t i = 0; i < PHRASE_Number_Of_Bitmap_Index; ++i) {
+ for ( size_t i = 0; i < PHRASE_NUMBER_OF_BITMAP_INDEX; ++i) {
phrase_begin = phrase_end;
index++;
phrase_end = *index;
@@ -402,7 +402,7 @@ bool PhraseBitmapIndexLevel::load(MemoryChunk * chunk, table_offset_t offset,
assert( phrase_end <= end );
assert( *(buf_begin + phrase_end - 1) == c_separate);
}
- offset += (PHRASE_Number_Of_Bitmap_Index + 1) * sizeof(table_offset_t);
+ offset += (PHRASE_NUMBER_OF_BITMAP_INDEX + 1) * sizeof(table_offset_t);
assert( c_separate == *(buf_begin + offset) );
return true;
}
@@ -412,13 +412,13 @@ bool PhraseBitmapIndexLevel::store(MemoryChunk * new_chunk,
table_offset_t & end){
table_offset_t phrase_end;
table_offset_t index = offset;
- offset += (PHRASE_Number_Of_Bitmap_Index + 1) * sizeof(table_offset_t);
+ offset += (PHRASE_NUMBER_OF_BITMAP_INDEX + 1) * sizeof(table_offset_t);
//add '#'
new_chunk->set_content(offset, &c_separate, sizeof(char));
offset +=sizeof(char);
new_chunk->set_content(index, &offset, sizeof(table_offset_t));
index += sizeof(table_offset_t);
- for ( size_t i = 0; i < PHRASE_Number_Of_Bitmap_Index; ++i) {
+ for ( size_t i = 0; i < PHRASE_NUMBER_OF_BITMAP_INDEX; ++i) {
PhraseLengthIndexLevel * phrases = m_phrase_length_indexes[i];
if ( !phrases ) { //null pointer
new_chunk->set_content(index, &offset, sizeof(table_offset_t));
diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h
index 0fc8509..be8ed04 100644
--- a/src/storage/phrase_large_table.h
+++ b/src/storage/phrase_large_table.h
@@ -28,13 +28,13 @@
namespace pinyin{
-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;
class PhraseBitmapIndexLevel{
protected:
- PhraseLengthIndexLevel * m_phrase_length_indexes[PHRASE_Number_Of_Bitmap_Index];
+ PhraseLengthIndexLevel * m_phrase_length_indexes[PHRASE_NUMBER_OF_BITMAP_INDEX];
//shift one utf16_t for class PhraseLengthIndexLevel, just like PinyinLengthIndexLevel.
void reset();
public: