Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: services/prediction/dictionary_service.cc

Issue 1342973002: Initialize local arrays. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed clang warning Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/prediction/dictionary_service.cc
diff --git a/services/prediction/dictionary_service.cc b/services/prediction/dictionary_service.cc
index 2e0600de65f3f054936add288ee9d76c3179b138..de2115bf63117ce60196dd50cb7b4e40f773c98d 100644
--- a/services/prediction/dictionary_service.cc
+++ b/services/prediction/dictionary_service.cc
@@ -172,9 +172,10 @@ mojo::Array<mojo::String> DictionaryService::GetDictionarySuggestion(
// modified from Android JniDataUtils::constructPrevWordsInfo
latinime::PrevWordsInfo DictionaryService::ProcessPrevWord(
mojo::Array<PrevWordInfoPtr>& prev_words) {
- int prev_word_codepoints[MAX_PREV_WORD_COUNT_FOR_N_GRAM][MAX_WORD_LENGTH];
- int prev_word_codepoint_count[MAX_PREV_WORD_COUNT_FOR_N_GRAM];
- bool are_beginning_of_sentence[MAX_PREV_WORD_COUNT_FOR_N_GRAM];
+ int prev_word_codepoints[MAX_PREV_WORD_COUNT_FOR_N_GRAM][MAX_WORD_LENGTH] = {
+ {0}};
+ int prev_word_codepoint_count[MAX_PREV_WORD_COUNT_FOR_N_GRAM] = {0};
+ bool are_beginning_of_sentence[MAX_PREV_WORD_COUNT_FOR_N_GRAM] = {false};
int prevwords_count = std::min(
prev_words.size(), static_cast<size_t>(MAX_PREV_WORD_COUNT_FOR_N_GRAM));
for (int i = 0; i < prevwords_count; ++i) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698