summaryrefslogtreecommitdiff
path: root/src/lookup
diff options
context:
space:
mode:
authorOBATA Akio <obache@users.noreply.github.com>2015-07-19 14:35:23 +0900
committerOBATA Akio <obache@users.noreply.github.com>2015-07-19 14:35:23 +0900
commitb6baee109a978add5acc263b9b36470dec5e90e8 (patch)
tree8dc4b38a48982dce99e081262c931eb72f648d55 /src/lookup
parent80a82ee011e93fdf18c176b5508c859a4e28440c (diff)
downloadlibpinyin-b6baee109a978add5acc263b9b36470dec5e90e8.tar.gz
Resolve ambiguos usage of log(3)
lookup_t expect gfloat, so pass float literal value instead of int.
Diffstat (limited to 'src/lookup')
-rw-r--r--src/lookup/phrase_lookup.cpp2
-rw-r--r--src/lookup/pinyin_lookup2.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
index 451bc3a..6070727 100644
--- a/src/lookup/phrase_lookup.cpp
+++ b/src/lookup/phrase_lookup.cpp
@@ -38,7 +38,7 @@ static bool populate_prefixes(GPtrArray * steps_index,
GPtrArray * steps_content) {
lookup_key_t initial_key = sentence_start;
- lookup_value_t initial_value(log(1));
+ lookup_value_t initial_value(log(1.f));
initial_value.m_handles[1] = sentence_start;
LookupStepContent initial_step_content = (LookupStepContent)
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp
index 2250a93..15ec222 100644
--- a/src/lookup/pinyin_lookup2.cpp
+++ b/src/lookup/pinyin_lookup2.cpp
@@ -133,7 +133,7 @@ static bool populate_prefixes(GPtrArray * steps_index,
for (size_t i = 0; i < prefixes->len; ++i) {
phrase_token_t token = g_array_index(prefixes, phrase_token_t, i);
lookup_key_t initial_key = token;
- lookup_value_t initial_value(log(1));
+ lookup_value_t initial_value(log(1.f));
initial_value.m_handles[1] = token;
LookupStepContent initial_step_content = (LookupStepContent)