From 4fbe19e5eaeb4d1bdb509daafeedbf923438b1b7 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 9 Nov 2011 10:33:22 +0800 Subject: fixes pinyin parser table compile --- src/storage/chewing_key.h | 10 ++++++++++ src/storage/pinyin_parser2.cpp | 1 + src/storage/pinyin_parser2.h | 3 +++ 3 files changed, 14 insertions(+) (limited to 'src/storage') diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h index 970ed72..8234a4f 100644 --- a/src/storage/chewing_key.h +++ b/src/storage/chewing_key.h @@ -22,6 +22,8 @@ #ifndef CHEWING_KEY_H #define CHEWING_KEY_H +#include + /** @file chewing_key.h * @brief the definitions of chewing key related classes and structs. */ @@ -137,6 +139,14 @@ struct ChewingKey m_final = CHEWING_ZERO_FINAL; m_tone = CHEWING_ZERO_TONE; } + + ChewingKey(ChewingInitial initial, ChewingMiddle middle, + ChewingFinal final) { + m_initial = initial; + m_middle = middle; + m_final = final; + m_tone = CHEWING_ZERO_TONE; + } }; struct ChewingKeyRest diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 7553ef6..0d68235 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -21,4 +21,5 @@ #include "pinyin_custom2.h" #include "chewing_key.h" +#include "pinyin_parser2.h" #include "pinyin_parser_table.h" diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index e2c09a8..c2702cd 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -24,6 +24,8 @@ #include "chewing_key.h" +namespace pinyin{ + typedef struct { const char * m_pinyin_str; const char * m_chewing_str; @@ -57,4 +59,5 @@ typedef struct { gfloat m_benefit; } resplit_table_item_t; +}; #endif -- cgit