[cleanup] Simplify loop over map

Change-Id: Ibda6dc025e9a1584480154fba63ecf3c7b51394b
Reviewed-on: https://chromium-review.googlesource.com/897765
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51068}
This commit is contained in:
Franziska Hinkelmann 2018-02-02 14:34:27 +01:00 committed by Commit Bot
parent 02cf73ccbf
commit 30f8bc10f6

View File

@ -524,9 +524,9 @@ void CodeMap::MoveCode(Address from, Address to) {
}
void CodeMap::Print() {
for (auto it = code_map_.begin(); it != code_map_.end(); ++it) {
base::OS::Print("%p %5d %s\n", static_cast<void*>(it->first),
it->second.size, it->second.entry->name());
for (const auto& pair : code_map_) {
base::OS::Print("%p %5d %s\n", static_cast<void*>(pair.first),
pair.second.size, pair.second.entry->name());
}
}