From 02e25119b15a6f619f17db99f5d05124a5807ff3 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 14 Aug 2013 16:14:24 -0700 Subject: Fix up TODO: c++0x, update cpplint. Needed to update cpplint to handle const auto. Fixed a few cpplint errors that were being missed before. Replaced most of the TODO c++0x with ranged based loops. Loops which do not have a descriptive container name have a concrete type instead of auto. Change-Id: Id7cc0f27030f56057c544e94277300b3f298c9c5 --- runtime/indirect_reference_table.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'runtime/indirect_reference_table.cc') diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc index 3e75716..8af4d7e 100644 --- a/runtime/indirect_reference_table.cc +++ b/runtime/indirect_reference_table.cc @@ -309,9 +309,8 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) { } void IndirectReferenceTable::VisitRoots(RootVisitor* visitor, void* arg) { - typedef IndirectReferenceTable::iterator It; // TODO: C++0x auto - for (It it = begin(), end = this->end(); it != end; ++it) { - visitor(**it, arg); + for (auto ref : *this) { + visitor(*ref, arg); } } -- cgit v1.1