From 7c43d981edce11bdd17b7e6e43f50af4680554aa Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 10 May 2016 16:01:29 +0800 Subject: fixes compile --- src/storage/phonetic_key_matrix.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/storage/phonetic_key_matrix.h') 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); } -- cgit