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
diff --git a/runtime/verifier/reg_type.cc b/runtime/verifier/reg_type.cc
index 8418928..25f840c 100644
--- a/runtime/verifier/reg_type.cc
+++ b/runtime/verifier/reg_type.cc
@@ -395,8 +395,7 @@
std::stringstream result;
std::set<uint16_t> types = GetMergedTypes();
result << "UnresolvedMergedReferences(";
- typedef std::set<uint16_t>::const_iterator It; // TODO: C++0x auto
- It it = types.begin();
+ auto it = types.begin();
result << reg_type_cache_->GetFromId(*it).Dump();
for (++it; it != types.end(); ++it) {
result << ", ";
@@ -609,9 +608,8 @@
types.insert(refs.second);
}
if (kIsDebugBuild) {
- typedef std::set<uint16_t>::const_iterator It; // TODO: C++0x auto
- for (It it = types.begin(); it != types.end(); ++it) {
- CHECK(!reg_type_cache_->GetFromId(*it).IsUnresolvedMergedReference());
+ for (const auto& type : types) {
+ CHECK(!reg_type_cache_->GetFromId(type).IsUnresolvedMergedReference());
}
}
return types;