summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-03-11 13:50:25 +0800
committerPeng Wu <alexepico@gmail.com>2016-03-11 13:50:25 +0800
commite4974da2914a30d3629feff4c8eff7011e43d214 (patch)
tree2f83ec547d622812e2238115a9a973d2ebb3bd7c /src/storage
parent0c3f25027e190d9644f904940d117f5d00a8a35c (diff)
downloadlibpinyin-e4974da2914a30d3629feff4c8eff7011e43d214.tar.gz
libpinyin-e4974da2914a30d3629feff4c8eff7011e43d214.tar.xz
libpinyin-e4974da2914a30d3629feff4c8eff7011e43d214.zip
use int phrase_length
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/chewing_large_table2.h2
-rw-r--r--src/storage/chewing_large_table2_bdb.cpp6
-rw-r--r--src/storage/chewing_large_table2_bdb.h8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/storage/chewing_large_table2.h b/src/storage/chewing_large_table2.h
index 62d8e38..64db0d4 100644
--- a/src/storage/chewing_large_table2.h
+++ b/src/storage/chewing_large_table2.h
@@ -39,7 +39,7 @@
namespace pinyin{
/* As this is a template class, the code will be in the header file. */
-template<size_t phrase_length>
+template<int phrase_length>
class ChewingTableEntry{
friend class ChewingLargeTable2;
protected:
diff --git a/src/storage/chewing_large_table2_bdb.cpp b/src/storage/chewing_large_table2_bdb.cpp
index 90c24ae..bce9129 100644
--- a/src/storage/chewing_large_table2_bdb.cpp
+++ b/src/storage/chewing_large_table2_bdb.cpp
@@ -215,7 +215,7 @@ bool ChewingLargeTable2::store_db(const char * new_filename) {
return true;
}
-template<size_t phrase_length>
+template<int phrase_length>
int ChewingLargeTable2::search_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const {
@@ -300,7 +300,7 @@ int ChewingLargeTable2::search(int phrase_length,
return SEARCH_NONE;
}
-template<size_t phrase_length>
+template<int phrase_length>
int ChewingLargeTable2::add_index_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* in */ phrase_token_t token) {
@@ -428,7 +428,7 @@ int ChewingLargeTable2::add_index(int phrase_length,
return result;
}
-template<size_t phrase_length>
+template<int phrase_length>
int ChewingLargeTable2::remove_index_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* in */ phrase_token_t token) {
diff --git a/src/storage/chewing_large_table2_bdb.h b/src/storage/chewing_large_table2_bdb.h
index 21e0a37..5961dbd 100644
--- a/src/storage/chewing_large_table2_bdb.h
+++ b/src/storage/chewing_large_table2_bdb.h
@@ -28,7 +28,7 @@
namespace pinyin{
-template<size_t phrase_length>
+template<int phrase_length>
class ChewingTableEntry;
class ChewingLargeTable2{
@@ -46,7 +46,7 @@ protected:
void reset();
protected:
- template<size_t phrase_length>
+ template<int phrase_length>
int search_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
@@ -56,7 +56,7 @@ protected:
/* in */ const ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const;
- template<size_t phrase_length>
+ template<int phrase_length>
int add_index_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* in */ phrase_token_t token);
@@ -66,7 +66,7 @@ protected:
/* in */ const ChewingKey keys[],
/* in */ phrase_token_t token);
- template<size_t phrase_length>
+ template<int phrase_length>
int remove_index_internal(/* in */ const ChewingKey index[],
/* in */ const ChewingKey keys[],
/* in */ phrase_token_t token);