From: Peng Wu Date: Wed, 24 Aug 2011 01:37:34 +0000 (+0800) Subject: fixes compile with c++0x X-Git-Tag: 0.2.99.1~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51b8bf1f01b64cb8c22dd25e9ac636b80ba8cd18;p=platform%2Fupstream%2Flibpinyin.git fixes compile with c++0x --- diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp index e1c4604..c69f587 100644 --- a/src/lookup/phrase_lookup.cpp +++ b/src/lookup/phrase_lookup.cpp @@ -29,8 +29,8 @@ using namespace pinyin; -const gfloat PhraseLookup::bigram_lambda; -const gfloat PhraseLookup::unigram_lambda; +const gfloat PhraseLookup::bigram_lambda = LAMBDA_PARAMETER; +const gfloat PhraseLookup::unigram_lambda = 1 - LAMBDA_PARAMETER; PhraseLookup::PhraseLookup(PhraseLargeTable * phrase_table, FacadePhraseIndex * phrase_index, diff --git a/src/lookup/phrase_lookup.h b/src/lookup/phrase_lookup.h index 495e44e..55f50a4 100644 --- a/src/lookup/phrase_lookup.h +++ b/src/lookup/phrase_lookup.h @@ -33,8 +33,8 @@ namespace pinyin{ class PhraseLookup{ private: - static const gfloat bigram_lambda = LAMBDA_PARAMETER; - static const gfloat unigram_lambda = 1 - LAMBDA_PARAMETER; + static const gfloat bigram_lambda; + static const gfloat unigram_lambda; PhraseItem m_cache_phrase_item; protected: diff --git a/src/lookup/pinyin_lookup.cpp b/src/lookup/pinyin_lookup.cpp index 7b8e623..b543321 100644 --- a/src/lookup/pinyin_lookup.cpp +++ b/src/lookup/pinyin_lookup.cpp @@ -34,8 +34,8 @@ using namespace pinyin; -const gfloat PinyinLookup::bigram_lambda; -const gfloat PinyinLookup::unigram_lambda; +const gfloat PinyinLookup::bigram_lambda = LAMBDA_PARAMETER; +const gfloat PinyinLookup::unigram_lambda = 1 - LAMBDA_PARAMETER; PinyinLookup::PinyinLookup(PinyinCustomSettings * custom, PinyinLargeTable * pinyin_table, diff --git a/src/lookup/pinyin_lookup.h b/src/lookup/pinyin_lookup.h index b8f2e58..a6f89e6 100644 --- a/src/lookup/pinyin_lookup.h +++ b/src/lookup/pinyin_lookup.h @@ -78,8 +78,8 @@ public: class PinyinLookup{ private: - static const gfloat bigram_lambda = LAMBDA_PARAMETER; - static const gfloat unigram_lambda = 1 - LAMBDA_PARAMETER; + static const gfloat bigram_lambda; + static const gfloat unigram_lambda; PhraseItem m_cache_phrase_item; protected: