diff options
author | 2013-08-14 16:14:24 -0700 | |
---|---|---|
committer | 2013-08-16 13:15:37 -0700 | |
commit | 02e25119b15a6f619f17db99f5d05124a5807ff3 (patch) | |
tree | 7be4cbbf28033e5ee0621565b410fe5d8170a8fb /compiler/driver/compiler_driver.cc | |
parent | 7d70a7932f0ba09eb01a93caab060aef1403d4e6 (diff) |
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
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index b8727fe103..0ef0428619 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -664,8 +664,7 @@ void CompilerDriver::LoadImageClasses(base::TimingLogger& timings) Thread* self = Thread::Current(); ScopedObjectAccess soa(self); ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - typedef DescriptorSet::iterator It; // TODO: C++0x auto - for (It it = image_classes_->begin(), end = image_classes_->end(); it != end;) { + for (auto it = image_classes_->begin(), end = image_classes_->end(); it != end;) { std::string descriptor(*it); SirtRef<mirror::Class> klass(self, class_linker->FindSystemClass(descriptor.c_str())); if (klass.get() == NULL) { @@ -687,12 +686,9 @@ void CompilerDriver::LoadImageClasses(base::TimingLogger& timings) unresolved_exception_types.clear(); class_linker->VisitClasses(ResolveCatchBlockExceptionsClassVisitor, &unresolved_exception_types); - typedef std::set<std::pair<uint16_t, const DexFile*> >::const_iterator It; // TODO: C++0x auto - for (It it = unresolved_exception_types.begin(), - end = unresolved_exception_types.end(); - it != end; ++it) { - uint16_t exception_type_idx = it->first; - const DexFile* dex_file = it->second; + for (const std::pair<uint16_t, const DexFile*>& exception_type : unresolved_exception_types) { + uint16_t exception_type_idx = exception_type.first; + const DexFile* dex_file = exception_type.second; mirror::DexCache* dex_cache = class_linker->FindDexCache(*dex_file); mirror:: ClassLoader* class_loader = NULL; SirtRef<mirror::Class> klass(self, class_linker->ResolveType(*dex_file, exception_type_idx, |