Commit 67102286 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

android: Fix Wrange-loop-analysis warnings.

Bug: 1039697
Change-Id: Ibcfdf5f2b6142c29b028fb65c43889ce27eeac83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2068314
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743832}
parent ffbe9e41
...@@ -1326,7 +1326,7 @@ void UiControllerAndroid::OnFormChanged(const FormProto* form) { ...@@ -1326,7 +1326,7 @@ void UiControllerAndroid::OnFormChanged(const FormProto* form) {
CounterInputProto counter_input = input.counter(); CounterInputProto counter_input = input.counter();
auto jcounters = Java_AssistantFormInput_createCounterList(env); auto jcounters = Java_AssistantFormInput_createCounterList(env);
for (const CounterInputProto::Counter counter : for (const CounterInputProto::Counter& counter :
counter_input.counters()) { counter_input.counters()) {
std::vector<int> allowed_values; std::vector<int> allowed_values;
for (int value : counter.allowed_values()) { for (int value : counter.allowed_values()) {
...@@ -1367,7 +1367,7 @@ void UiControllerAndroid::OnFormChanged(const FormProto* form) { ...@@ -1367,7 +1367,7 @@ void UiControllerAndroid::OnFormChanged(const FormProto* form) {
SelectionInputProto selection_input = input.selection(); SelectionInputProto selection_input = input.selection();
auto jchoices = Java_AssistantFormInput_createChoiceList(env); auto jchoices = Java_AssistantFormInput_createChoiceList(env);
for (const SelectionInputProto::Choice choice : for (const SelectionInputProto::Choice& choice :
selection_input.choices()) { selection_input.choices()) {
Java_AssistantFormInput_addChoice( Java_AssistantFormInput_addChoice(
env, jchoices, env, jchoices,
......
...@@ -27,7 +27,7 @@ ChromeBackupWatcher::ChromeBackupWatcher(Profile* profile) { ...@@ -27,7 +27,7 @@ ChromeBackupWatcher::ChromeBackupWatcher(Profile* profile) {
registrar_.Init(profile->GetPrefs()); registrar_.Init(profile->GetPrefs());
base::RepeatingClosure callback = base::RepeatingClosure callback =
base::BindRepeating(&BackupPrefsChanged, java_watcher_); base::BindRepeating(&BackupPrefsChanged, java_watcher_);
for (const std::string pref_name : GetBackupPrefNames()) { for (const std::string& pref_name : GetBackupPrefNames()) {
registrar_.Add(pref_name, callback); registrar_.Add(pref_name, callback);
} }
} }
......
...@@ -136,7 +136,7 @@ bool ScriptPrecondition::MatchParameters(const TriggerContext& context) const { ...@@ -136,7 +136,7 @@ bool ScriptPrecondition::MatchParameters(const TriggerContext& context) const {
bool ScriptPrecondition::MatchScriptStatus( bool ScriptPrecondition::MatchScriptStatus(
const std::map<std::string, ScriptStatusProto>& executed_scripts) const { const std::map<std::string, ScriptStatusProto>& executed_scripts) const {
for (const auto status_match : status_match_) { for (const auto& status_match : status_match_) {
auto status = SCRIPT_STATUS_NOT_RUN; auto status = SCRIPT_STATUS_NOT_RUN;
auto iter = executed_scripts.find(status_match.script()); auto iter = executed_scripts.find(status_match.script());
if (iter != executed_scripts.end()) { if (iter != executed_scripts.end()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment