summaryrefslogtreecommitdiffstats
path: root/src
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
parente0e33b0f6a137f8d358187a27819ba9e0267d55c (diff)
downloadlibpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.tar.gz
libpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.tar.xz
libpinyin-521123fdad1ff3dac8313eaf6630a0ad3bd699b5.zip
fixes compile
Diffstat (limited to 'src')
-rw-r--r--src/pinyin_internal.h1
-rw-r--r--src/storage/Makefile.am1
-rw-r--r--src/storage/phonetic_key_matrix.h13
3 files changed, 11 insertions, 4 deletions
diff --git a/src/pinyin_internal.h b/src/pinyin_internal.h
index a90738f..37a62ae 100644
--- a/src/pinyin_internal.h
+++ b/src/pinyin_internal.h
@@ -30,6 +30,7 @@
#include "chewing_key.h"
#include "pinyin_parser2.h"
#include "zhuyin_parser2.h"
+#include "phonetic_key_matrix.h"
#include "pinyin_phrase2.h"
#include "pinyin_phrase3.h"
#include "chewing_large_table2.h"
diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am
index 0c3a737..e897f84 100644
--- a/src/storage/Makefile.am
+++ b/src/storage/Makefile.am
@@ -28,6 +28,7 @@ noinst_HEADERS = chewing_enum.h \
chewing_key.h \
pinyin_parser2.h \
zhuyin_parser2.h \
+ phonetic_key_matrix.h \
phrase_index.h \
phrase_index_logger.h \
phrase_large_table2.h \
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);
}