summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-06-28 10:47:54 +0800
committerPeng Wu <alexepico@gmail.com>2016-06-28 10:47:54 +0800
commiteedae34d203bc1a07a1d09f7876661649538462a (patch)
tree50ebff0efa056dcf8e3cbe3dc7659f588c154262 /src/storage
parent88c6d1ac5b6a945730554da7a22e2e7716055bcb (diff)
downloadlibpinyin-eedae34d203bc1a07a1d09f7876661649538462a.tar.gz
libpinyin-eedae34d203bc1a07a1d09f7876661649538462a.tar.xz
libpinyin-eedae34d203bc1a07a1d09f7876661649538462a.zip
fixes compile
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/pinyin_phrase3.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/storage/pinyin_phrase3.h b/src/storage/pinyin_phrase3.h
index 76e8a04..19d56d8 100644
--- a/src/storage/pinyin_phrase3.h
+++ b/src/storage/pinyin_phrase3.h
@@ -22,9 +22,9 @@
#ifndef PINYIN_PHRASE3_H
#define PINYIN_PHRASE3_H
+#include <assert.h>
#include "novel_types.h"
#include "chewing_key.h"
-#include <assert.h>
/* All compare function should be symmetric for the lhs and rhs operands.
URL: http://en.cppreference.com/w/cpp/algorithm/equal_range . */
@@ -172,8 +172,10 @@ inline void compute_incomplete_chewing_index(const ChewingKey * in_keys,
ChewingKey * out_keys,
int phrase_length) {
for (int i = 0; i < phrase_length; ++i) {
- ChewingKey key;
- key.m_initial = in_keys[i].m_initial;
+ ChewingKey key = in_keys[i];
+ key.m_middle = CHEWING_ZERO_MIDDLE;
+ key.m_final = CHEWING_ZERO_FINAL;
+ key.m_tone = CHEWING_ZERO_TONE;
out_keys[i] = key;
}
}