summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-09-12 09:52:35 +0800
committerPeng Wu <alexepico@gmail.com>2012-09-12 09:52:35 +0800
commit1fcd7552ccc6116f141b631e77d236bb52126d11 (patch)
tree5b22dd9d888e2ddd40d01633b055b6e291f30650
parenta23434cf655de95b7f8ee94c1cb44cd9a1ea3739 (diff)
downloadlibpinyin-1fcd7552ccc6116f141b631e77d236bb52126d11.tar.gz
libpinyin-1fcd7552ccc6116f141b631e77d236bb52126d11.tar.xz
libpinyin-1fcd7552ccc6116f141b631e77d236bb52126d11.zip
re-factor pinyin_lookup2.cpp
-rw-r--r--src/lookup/pinyin_lookup2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp
index 4a859e9..c6686e0 100644
--- a/src/lookup/pinyin_lookup2.cpp
+++ b/src/lookup/pinyin_lookup2.cpp
@@ -135,12 +135,12 @@ static bool populate_prefixes(GPtrArray * steps_index,
lookup_value_t initial_value(log(1));
initial_value.m_handles[1] = token;
- GArray * initial_step_content = (GArray *)
+ LookupStepContent initial_step_content = (LookupStepContent)
g_ptr_array_index(steps_content, 0);
initial_step_content = g_array_append_val
(initial_step_content, initial_value);
- GHashTable * initial_step_index = (GHashTable *)
+ LookupStepIndex initial_step_index = (LookupStepIndex)
g_ptr_array_index(steps_index, 0);
g_hash_table_insert(initial_step_index,
GUINT_TO_POINTER(initial_key),
@@ -158,9 +158,9 @@ static bool init_steps(GPtrArray * steps_index,
g_ptr_array_set_size(steps_content, nstep);
for (int i = 0; i < nstep; ++i) {
- /* initialize m_steps_index */
+ /* initialize steps_index */
g_ptr_array_index(steps_index, i) = g_hash_table_new(g_direct_hash, g_direct_equal);
- /* initialize m_steps_content */
+ /* initialize steps_content */
g_ptr_array_index(steps_content, i) = g_array_new(FALSE, FALSE, sizeof(lookup_value_t));
}