summaryrefslogtreecommitdiffstats
path: root/src/storage/phonetic_key_matrix.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-09 16:10:54 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-09 16:10:54 +0800
commit521123fdad1ff3dac8313eaf6630a0ad3bd699b5 (patch)
treeba35e543e63571ada684d42a829dc528c962875d /src/storage/phonetic_key_matrix.h
parente0e33b0f6a137f8d358187a27819ba9e0267d55c (diff)
downloadlibpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.tar.gz
libpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.tar.xz
libpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.zip
fixes compile
Diffstat (limited to 'src/storage/phonetic_key_matrix.h')
-rw-r--r--src/storage/phonetic_key_matrix.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/storage/phonetic_key_matrix.h b/src/storage/phonetic_key_matrix.h
index 8125357..d5a3553 100644
--- a/src/storage/phonetic_key_matrix.h
+++ b/src/storage/phonetic_key_matrix.h
@@ -22,9 +22,11 @@
#ifndef PHONETIC_KEY_MATRIX_H
#define PHONETIC_KEY_MATRIX_H
+#include "chewing_key.h"
+
namespace pinyin {
-template<struct Item>
+template<typename Item>
class PhoneticTable {
protected:
/* Pointer Array of Array of Item. */
@@ -33,7 +35,8 @@ protected:
public:
bool clear_all() {
for (size_t i = 0; i < m_table_content->len; ++i) {
- GArray * column = g_ptr_array_index(m_table_content, i);
+ GArray * column = (GArray *)
+ g_ptr_array_index(m_table_content, i);
g_array_free(column, TRUE);
}
@@ -62,7 +65,8 @@ public:
if (index >= m_table_content->len)
return false;
- GArray * column = g_ptr_array_index(m_table_content, index);
+ GArray * column = (GArray *)
+ g_ptr_array_index(m_table_content, index);
g_array_append_vals(items, column->data, column->len);
return true;
}
@@ -71,7 +75,8 @@ public:
if (index >= m_table_content->len)
return false;
- GArray * column = g_ptr_array_index(m_table_content, index);
+ GArray * column = (GArray *)
+ g_ptr_array_index(m_table_content, index);
g_array_append_val(column, item);
}