fixes compile with c++0x
authorPeng Wu <alexepico@gmail.com>
Wed, 24 Aug 2011 01:37:34 +0000 (09:37 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 24 Aug 2011 01:37:34 +0000 (09:37 +0800)
src/lookup/phrase_lookup.cpp
src/lookup/phrase_lookup.h
src/lookup/pinyin_lookup.cpp
src/lookup/pinyin_lookup.h

index e1c4604..c69f587 100644 (file)
@@ -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,
index 495e44e..55f50a4 100644 (file)
@@ -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:
index 7b8e623..b543321 100644 (file)
@@ -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,
index b8f2e58..a6f89e6 100644 (file)
@@ -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: