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 | |
parent | ed390141d5517bda56c5e4abacde0cc91bd0af44 (diff) | |
download | libpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.tar.gz libpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.tar.xz libpinyin-7c43d981edce11bdd17b7e6e43f50af4680554aa.zip |
fixes compile
-rw-r--r-- | src/storage/phonetic_key_matrix.cpp | 1 | ||||
-rw-r--r-- | src/storage/phonetic_key_matrix.h | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp index 5f65dc0..17671d7 100644 --- a/src/storage/phonetic_key_matrix.cpp +++ b/src/storage/phonetic_key_matrix.cpp @@ -65,5 +65,6 @@ bool fill_phonetic_key_matrix_from_chewing_keys(PhoneticKeyMatrix * matrix, zero_key_rest.m_raw_begin = length - 1; zero_key_rest.m_raw_end = length; matrix->append(length - 1, zero_key, zero_key_rest); + return true; } 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); } |