summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-07-07 16:44:04 +0800
committerPeng Wu <alexepico@gmail.com>2014-07-07 16:44:04 +0800
commite5bbbdea08662eb91f6f0be941235bde6bf7c935 (patch)
tree2fecebfdebd8307bcefc3607d0e70a92e33d549e /src
parent5e1ef814ff33081705ea126b83fee6495c4de4bc (diff)
downloadibus-libzhuyin-e5bbbdea08662eb91f6f0be941235bde6bf7c935.tar.gz
ibus-libzhuyin-e5bbbdea08662eb91f6f0be941235bde6bf7c935.tar.xz
ibus-libzhuyin-e5bbbdea08662eb91f6f0be941235bde6bf7c935.zip
fixes a bug
Diffstat (limited to 'src')
-rw-r--r--src/ZYZBopomofoSymbolSection.cc2
-rw-r--r--src/ZYZBopomofoSymbolSection.h1
-rw-r--r--src/ZYZBuiltinSymbolSection.cc2
-rw-r--r--src/ZYZBuiltinSymbolSection.h1
4 files changed, 4 insertions, 2 deletions
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<String> 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<String> m_candidates;
};