diff options
| author | Peng Huang <shawn.p.huang@gmail.com> | 2010-05-19 21:43:56 +0800 |
|---|---|---|
| committer | Peng Huang <shawn.p.huang@gmail.com> | 2010-05-19 21:43:56 +0800 |
| commit | f276b2072f2c9b2b344a673486bb7907d7c8ac44 (patch) | |
| tree | f3436843959f32a323486167f6c95bbb803735f8 /src | |
| parent | b7afcc3ca1e9a7efac29f7f10da008b6ec052a91 (diff) | |
| download | ibus-libpinyin-f276b2072f2c9b2b344a673486bb7907d7c8ac44.tar.gz ibus-libpinyin-f276b2072f2c9b2b344a673486bb7907d7c8ac44.tar.xz ibus-libpinyin-f276b2072f2c9b2b344a673486bb7907d7c8ac44.zip | |
Refine coding style
Diffstat (limited to 'src')
| -rw-r--r-- | src/Phrase.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Phrase.h b/src/Phrase.h index e81d6cd..321574a 100644 --- a/src/Phrase.h +++ b/src/Phrase.h @@ -6,12 +6,14 @@ namespace PY { +#define PHRASE_LEN_IN_BYTE (MAX_UTF8_LEN * (MAX_PHRASE_LEN + 1)) + struct Phrase { - gchar phrase[MAX_UTF8_LEN * (MAX_PHRASE_LEN + 1)]; - guint freq; - guint user_freq; - guint pinyin_id[MAX_PHRASE_LEN][2]; - guint len; + gchar phrase[PHRASE_LEN_IN_BYTE]; + guint freq; + guint user_freq; + guint pinyin_id[MAX_PHRASE_LEN][2]; + guint len; void reset (void) { phrase[0] = 0; |
