summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-24 16:45:59 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-24 16:45:59 +0800
commit65494d1d325294deb4f0abea0c18462b9f29b5e7 (patch)
treede2ab9afce0b731c2e1a21801a4d97b46439f4ca
parentb92ec5fc578b73479861b7da9e4524fc8998df2d (diff)
downloadlibpinyin-65494d1d325294deb4f0abea0c18462b9f29b5e7.tar.gz
libpinyin-65494d1d325294deb4f0abea0c18462b9f29b5e7.tar.xz
libpinyin-65494d1d325294deb4f0abea0c18462b9f29b5e7.zip
fixes some typos
-rw-r--r--src/storage/phonetic_key_matrix.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp
index bd6c561..a1623d5 100644
--- a/src/storage/phonetic_key_matrix.cpp
+++ b/src/storage/phonetic_key_matrix.cpp
@@ -92,14 +92,15 @@ bool fuzzy_syllable_step(pinyin_option_t options,
const ChewingKeyRest key_rest = g_array_index(key_rests,
ChewingKeyRest, i);
-#define MATCH(AMBIGUITY, ORIGIN, ANOTHER) do { \
- if (options & AMBIGUITY) { \
- if (ORIGIN == key.m_initial) { \
- ChewingKey newkey = key; \
- newkey.m_initial = ANOTHER; \
- matrix->append(index, newkey, key_rest); \
- } \
- } \
+#define MATCH(AMBIGUITY, ORIGIN, ANOTHER) do { \
+ if (options & AMBIGUITY) { \
+ if (ORIGIN == key.m_initial) { \
+ ChewingKey newkey = key; \
+ newkey.m_initial = ANOTHER; \
+ if (0 != newkey.get_table_index()) \
+ matrix->append(index, newkey, key_rest); \
+ } \
+ } \
} while (0)
@@ -241,7 +242,7 @@ int search_matrix_recur(GArray * cached_keys,
g_array_set_size(cached_keys, cached_keys->len - 1);
}
- return true;
+ return result;
}
int search_matrix(FacadeChewingTable2 * table,