summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_large_table2.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-18 11:16:14 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-18 11:16:14 +0800
commit0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2 (patch)
treecf3b406791589c4f89b453aa457b786801af7852 /src/storage/phrase_large_table2.h
parentbd771b0c51f35c6ab6377719ab654370782ef1c9 (diff)
downloadlibpinyin-0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2.tar.gz
libpinyin-0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2.tar.xz
libpinyin-0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2.zip
add const modifiers for phrase table
Diffstat (limited to 'src/storage/phrase_large_table2.h')
-rw-r--r--src/storage/phrase_large_table2.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/storage/phrase_large_table2.h b/src/storage/phrase_large_table2.h
index d92fa0e..45182d9 100644
--- a/src/storage/phrase_large_table2.h
+++ b/src/storage/phrase_large_table2.h
@@ -48,13 +48,13 @@ public:
bool store(MemoryChunk * new_chunk, table_offset_t offset, table_offset_t & end);
/* search method */
- int search(int phrase_length, /* in */ ucs4_t phrase[],
+ int search(int phrase_length, /* in */ const ucs4_t phrase[],
/* out */ PhraseTokens tokens) const;
/* add_index/remove_index method */
- int add_index(int phrase_length, /* in */ ucs4_t phrase[], /* in */ phrase_token_t token);
+ int add_index(int phrase_length, /* in */ const ucs4_t phrase[], /* in */ phrase_token_t token);
- int remove_index(int phrase_length, /* in */ ucs4_t phrase[], /* in */ phrase_token_t token);
+ int remove_index(int phrase_length, /* in */ const ucs4_t phrase[], /* in */ phrase_token_t token);
/* mask out method */
bool mask_out(phrase_token_t mask, phrase_token_t value);
@@ -96,17 +96,17 @@ public:
bool load_text(FILE * file);
/* search method */
- int search(int phrase_length, /* in */ ucs4_t phrase[],
+ int search(int phrase_length, /* in */ const ucs4_t phrase[],
/* out */ PhraseTokens tokens) const {
return m_bitmap_table.search(phrase_length, phrase, tokens);
}
/* add_index/remove_index method */
- int add_index(int phrase_length, /* in */ ucs4_t phrase[], /* in */ phrase_token_t token) {
+ int add_index(int phrase_length, /* in */ const ucs4_t phrase[], /* in */ phrase_token_t token) {
return m_bitmap_table.add_index(phrase_length, phrase, token);
}
- int remove_index(int phrase_length, /* in */ ucs4_t phrase[], /* in */ phrase_token_t token) {
+ int remove_index(int phrase_length, /* in */ const ucs4_t phrase[], /* in */ phrase_token_t token) {
return m_bitmap_table.remove_index(phrase_length, phrase, token);
}