From b17c3c025db379fbeb56c4215bc1eb8737576f4c Mon Sep 17 00:00:00 2001 From: "hajimehoshi@google.com" Date: Thu, 12 Sep 2013 10:39:23 +0000 Subject: [PATCH] Fix for Windows (an extern value can't be treated as a constant) git-svn-id: https://cld2.googlecode.com/svn/trunk@84 b252ecd4-b096-bf77-eb8e-91563289f87e --- internal/compact_lang_det_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/compact_lang_det_impl.cc b/internal/compact_lang_det_impl.cc index f7f9e3c..a2a96b9 100644 --- a/internal/compact_lang_det_impl.cc +++ b/internal/compact_lang_det_impl.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include "cldutil.h" #include "debug.h" @@ -1537,8 +1538,7 @@ void ApplyHints(const char* buffer, // Put whacks into scoring context // We do not in general want zh-Hans and zh-Hant to be close pairs, // but we do here. Use close_set_count[kCloseSetSize] to count zh, zh-Hant - int close_set_count[kCloseSetSize + 1]; - memset(close_set_count, 0, sizeof(close_set_count)); + std::vector close_set_count(kCloseSetSize + 1, 0); for (int i = 0; i < GetCLDLangPriorCount(&lang_priors); ++i) { Language lang = GetCLDPriorLang(lang_priors.prior[i]);