summaryrefslogtreecommitdiffstats
path: root/src/storage/phonetic_key_matrix.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-10 16:01:29 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-10 16:01:29 +0800
commit7c43d981edce11bdd17b7e6e43f50af4680554aa (patch)
treeb6558f0ade2523abfa04d55eb9449306ec147671 /src/storage/phonetic_key_matrix.h
parented390141d5517bda56c5e4abacde0cc91bd0af44 (diff)
downloadlibpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.tar.gz
libpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.tar.xz
libpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.zip
fixes compile
Diffstat (limited to 'src/storage/phonetic_key_matrix.h')
-rw-r--r--src/storage/phonetic_key_matrix.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/storage/phonetic_key_matrix.h b/src/storage/phonetic_key_matrix.h
index aab1b69..7fc194c 100644
--- a/src/storage/phonetic_key_matrix.h
+++ b/src/storage/phonetic_key_matrix.h
@@ -72,13 +72,14 @@ public:
return true;
}
- bool append(size_t index, Item & item) {
+ bool append(size_t index, const Item & item) {
if (index >= m_table_content->len)
return false;
GArray * column = (GArray *)
g_ptr_array_index(m_table_content, index);
g_array_append_val(column, item);
+ return true;
}
};
@@ -104,7 +105,8 @@ public:
m_key_rests.get_items(index, key_rests);
}
- bool append(size_t index, ChewingKey & key, ChewingKeyRest & key_rest) {
+ bool append(size_t index, const ChewingKey & key,
+ const ChewingKeyRest & key_rest) {
return m_keys.append(index, key) &&
m_key_rests.append(index, key_rest);
}