remove pinyin_choose_candidate
authorPeng Wu <alexepico@gmail.com>
Mon, 2 Jul 2012 04:51:52 +0000 (12:51 +0800)
committerPeng Wu <alexepico@gmail.com>
Mon, 2 Jul 2012 04:51:52 +0000 (12:51 +0800)
src/pinyin.cpp
src/pinyin.h

index b0d9d23ca0524e52567c0a694813b224eb3e41a0..08315291a4e3d6148ee69eb55a70c5426c312e95 100644 (file)
@@ -1508,24 +1508,6 @@ bool pinyin_get_full_pinyin_candidates(pinyin_instance_t * instance,
 }
 
 
-int pinyin_choose_candidate(pinyin_instance_t * instance,
-                            size_t offset,
-                            lookup_candidate_t * candidate){
-    pinyin_context_t * & context = instance->m_context;
-
-    assert(NORMAL_CANDIDATE == candidate->m_candidate_type);
-
-    phrase_token_t token = candidate->m_token;
-
-    guint8 len = context->m_pinyin_lookup->add_constraint
-        (instance->m_constraints, offset, token);
-
-    bool retval = context->m_pinyin_lookup->validate_constraint
-        (instance->m_constraints, instance->m_pinyin_keys) && len;
-
-    return offset + len;
-}
-
 int pinyin_choose_full_pinyin_candidate(pinyin_instance_t * instance,
                                         size_t offset,
                                         lookup_candidate_t * candidate){
index c9c7bf7d687f48f60618c151225340bc83b46ae4..f30d1a9829e4cdca9d773943c910108138d038e7 100644 (file)
@@ -390,20 +390,6 @@ bool pinyin_get_full_pinyin_candidates(pinyin_instance_t * instance,
                                        size_t offset,
                                        CandidateVector candidates);
 
-/**
- * pinyin_choose_candidate:
- * @instance: the pinyin instance.
- * @offset: the offset in the pinyin keys.
- * @candidate: the selected candidate.
- * @returns: the cursor after the chosen candidate.
- *
- * Choose an candidate at the offset.
- *
- */
-int pinyin_choose_candidate(pinyin_instance_t * instance,
-                            size_t offset,
-                            lookup_candidate_t * candidate);
-
 /**
  * pinyin_choose_full_pinyin_candidate:
  * @instance: the pinyin instance.