From 1eeb00c7499c520159a38af4be3835aee7ee7b38 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 3 Nov 2016 08:19:01 -0700 Subject: [PATCH] ART: Change iterator value type to match Make keys const. Bug: 32619234 Test: m Change-Id: I240341a0fec79754bea2ed21c0d0a4ddd119ce35 --- runtime/hprof/hprof.cc | 4 ++-- runtime/verifier/register_line.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc index 233675980..8cbe49166 100644 --- a/runtime/hprof/hprof.cc +++ b/runtime/hprof/hprof.cc @@ -574,9 +574,9 @@ class Hprof : public SingleRootVisitor { } void WriteStringTable() { - for (const std::pair& p : strings_) { + for (const auto& p : strings_) { const std::string& string = p.first; - const size_t id = p.second; + const HprofStringId id = p.second; output_->StartNewRecord(HPROF_TAG_STRING, kHprofTime); diff --git a/runtime/verifier/register_line.cc b/runtime/verifier/register_line.cc index 4ec2da6e5..da3d94614 100644 --- a/runtime/verifier/register_line.cc +++ b/runtime/verifier/register_line.cc @@ -411,7 +411,7 @@ bool FindLockAliasedRegister(uint32_t src, } // Scan the map for the same value. - for (const std::pair& pair : search_map) { + for (const std::pair& pair : search_map) { if (pair.first != src && pair.second == src_lock_levels) { return true; } -- 2.11.0