diff options
author | Peng Wu <alexepico@gmail.com> | 2016-05-10 16:01:29 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-05-10 16:01:29 +0800 |
commit | 7c43d981edce11bdd17b7e6e43f50af4680554aa (patch) | |
tree | b6558f0ade2523abfa04d55eb9449306ec147671 /src/storage/phonetic_key_matrix.h | |
parent | ed390141d5517bda56c5e4abacde0cc91bd0af44 (diff) | |
download | libpinyin-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.h | 6 |
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); } |