Chromium Code Reviews| Index: components/translate/core/language_detection/language_detection_util.cc |
| diff --git a/components/translate/core/language_detection/language_detection_util.cc b/components/translate/core/language_detection/language_detection_util.cc |
| index 56289a46332949cdb65b1d5781c882ed4744e480..8df71b6433fad972bd90d1eccb8399097cea1e0a 100644 |
| --- a/components/translate/core/language_detection/language_detection_util.cc |
| +++ b/components/translate/core/language_detection/language_detection_util.cc |
| @@ -86,11 +86,12 @@ std::string DetermineTextLanguage(const base::string16& text, |
| const int num_utf8_bytes = static_cast<int>(utf8_text.size()); |
| const char* raw_utf8_bytes = utf8_text.c_str(); |
| - CLD2::Language language3[3]; |
| - int percent3[3]; |
| + CLD2::Language language3[3] = { |
| + CLD2::UNKNOWN_LANGUAGE, CLD2::UNKNOWN_LANGUAGE, CLD2::UNKNOWN_LANGUAGE}; |
| + int percent3[3] = {0, 0, 0}; |
| int flags = 0; // No flags, see compact_lang_det.h for details. |
| int text_bytes; // Amount of non-tag/letters-only text (assumed 0). |
| - double normalized_score3[3]; |
| + double normalized_score3[3] = {0, 0, 0}; |
|
Takashi Toyoshima
2016/05/11 06:08:50
0.0 is better for double?
|
| const char* tld_hint = ""; |
| int encoding_hint = CLD2::UNKNOWN_ENCODING; |