diff options
| author | Peng Huang <shawn.p.huang@gmail.com> | 2010-04-08 18:29:59 +0800 |
|---|---|---|
| committer | Peng Huang <shawn.p.huang@gmail.com> | 2010-04-08 18:29:59 +0800 |
| commit | 1496b0a56bbd45cdafa44934a73e026b19593dae (patch) | |
| tree | 9555acf8cb4456f5a33b00e6faf1bf4982423332 /src/PinyinArray.h | |
| parent | 5817602139905bd82a9cf9d14811d2ed08ded672 (diff) | |
| download | ibus-libpinyin-1496b0a56bbd45cdafa44934a73e026b19593dae.tar.gz ibus-libpinyin-1496b0a56bbd45cdafa44934a73e026b19593dae.tar.xz ibus-libpinyin-1496b0a56bbd45cdafa44934a73e026b19593dae.zip | |
Does not use Array anymore
Diffstat (limited to 'src/PinyinArray.h')
| -rw-r--r-- | src/PinyinArray.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PinyinArray.h b/src/PinyinArray.h index c02c5d6..fa70c79 100644 --- a/src/PinyinArray.h +++ b/src/PinyinArray.h @@ -1,8 +1,8 @@ #ifndef __PY_PINYIN_ARRAY_H_ #define __PY_PINYIN_ARRAY_H_ +#include <vector> #include "Types.h" -#include "Array.h" namespace PY { @@ -31,9 +31,12 @@ struct PinyinSegment { } }; -class PinyinArray: public Array<PinyinSegment> { +class PinyinArray: public std::vector<PinyinSegment> { public: - PinyinArray (guint init_size = 0) : Array<PinyinSegment> (init_size) {} + PinyinArray (guint init_size = 0) { + std::vector<PinyinSegment>::reserve (init_size); + } + void append (const Pinyin *pinyin, guint begin, guint len) { push_back (PinyinSegment (pinyin, begin, len)); } |
