From e5bbbdea08662eb91f6f0be941235bde6bf7c935 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 7 Jul 2014 16:44:04 +0800 Subject: fixes a bug --- src/ZYZBopomofoSymbolSection.cc | 2 ++ src/ZYZBopomofoSymbolSection.h | 1 - src/ZYZBuiltinSymbolSection.cc | 2 ++ src/ZYZBuiltinSymbolSection.h | 1 - 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ZYZBopomofoSymbolSection.cc b/src/ZYZBopomofoSymbolSection.cc index 7ccf5f6..8c34831 100644 --- a/src/ZYZBopomofoSymbolSection.cc +++ b/src/ZYZBopomofoSymbolSection.cc @@ -41,6 +41,8 @@ bool BopomofoSymbolSection::initCandidates (zhuyin_instance_t * instance, const String & lookup) { + m_candidates.clear (); + assert (1 == lookup.length ()); m_lookup = lookup; const char key = lookup[0]; diff --git a/src/ZYZBopomofoSymbolSection.h b/src/ZYZBopomofoSymbolSection.h index 5fa13e5..9ff7226 100644 --- a/src/ZYZBopomofoSymbolSection.h +++ b/src/ZYZBopomofoSymbolSection.h @@ -44,7 +44,6 @@ public: virtual int selectCandidate (guint index); protected: - String m_lookup; std::vector m_candidates; }; diff --git a/src/ZYZBuiltinSymbolSection.cc b/src/ZYZBuiltinSymbolSection.cc index b15c985..0ed7136 100644 --- a/src/ZYZBuiltinSymbolSection.cc +++ b/src/ZYZBuiltinSymbolSection.cc @@ -43,6 +43,8 @@ BuiltinSymbolSection::initCandidates (zhuyin_instance_t * instance, if (!lookup) return false; + m_candidates.clear (); + assert (1 == lookup.length ()); m_lookup = lookup; diff --git a/src/ZYZBuiltinSymbolSection.h b/src/ZYZBuiltinSymbolSection.h index afb91ac..cacd656 100644 --- a/src/ZYZBuiltinSymbolSection.h +++ b/src/ZYZBuiltinSymbolSection.h @@ -44,7 +44,6 @@ public: virtual int selectCandidate (guint index); protected: - String m_lookup; std::vector m_candidates; }; -- cgit