summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-02-24 13:49:20 +0800
committerPeng Wu <alexepico@gmail.com>2016-02-24 13:49:20 +0800
commit707a5a875ac570929cf8dab8f34e4769ee00099e (patch)
treebd8e88897c9247b579a09503f72fc1843b17fa9e /src
parent9b88313553228c21f0284b0449e717c255cd0ac3 (diff)
refactor pinyin_phrase2.h
Diffstat (limited to 'src')
-rw-r--r--src/storage/pinyin_phrase2.h13
-rw-r--r--src/storage/pinyin_phrase3.h14
2 files changed, 14 insertions, 13 deletions
diff --git a/src/storage/pinyin_phrase2.h b/src/storage/pinyin_phrase2.h
index 655678b..9f12617 100644
--- a/src/storage/pinyin_phrase2.h
+++ b/src/storage/pinyin_phrase2.h
@@ -299,19 +299,6 @@ inline void compute_upper_value2(pinyin_option_t options,
}
-template<size_t phrase_length>
-struct PinyinIndexItem2{
- phrase_token_t m_token;
- ChewingKey m_keys[phrase_length];
-public:
- PinyinIndexItem2<phrase_length> (const ChewingKey * keys,
- phrase_token_t token) {
- memmove(m_keys, keys, sizeof(ChewingKey) * phrase_length);
- m_token = token;
- }
-};
-
-
};
#endif
diff --git a/src/storage/pinyin_phrase3.h b/src/storage/pinyin_phrase3.h
index 6ce1698..fb6c769 100644
--- a/src/storage/pinyin_phrase3.h
+++ b/src/storage/pinyin_phrase3.h
@@ -60,6 +60,20 @@ inline int pinyin_exact_compare2(const ChewingKey * key_lhs,
return 0;
}
+
+template<size_t phrase_length>
+struct PinyinIndexItem2{
+ phrase_token_t m_token;
+ ChewingKey m_keys[phrase_length];
+public:
+ PinyinIndexItem2<phrase_length> (const ChewingKey * keys,
+ phrase_token_t token) {
+ memmove(m_keys, keys, sizeof(ChewingKey) * phrase_length);
+ m_token = token;
+ }
+};
+
+
/* for find the element in the phrase array */
template<size_t phrase_length>
inline int phrase_exact_compare2(const PinyinIndexItem2<phrase_length> &lhs,