diff options
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 2 | ||||
| -rw-r--r-- | runtime/gc/space/image_space.cc | 2 | ||||
| -rw-r--r-- | runtime/oat_file_manager.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 1b87725230..850393437a 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1522,7 +1522,7 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(const mirror::Class* referrer if (!use_dex_cache) { bool method_in_image = false; - const std::vector<gc::space::ImageSpace*> image_spaces = heap->GetBootImageSpaces(); + const std::vector<gc::space::ImageSpace*>& image_spaces = heap->GetBootImageSpaces(); for (gc::space::ImageSpace* image_space : image_spaces) { const auto& method_section = image_space->GetImageHeader().GetMethodsSection(); if (method_section.Contains(reinterpret_cast<uint8_t*>(method) - image_space->Begin())) { diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index 118daac74a..0b602e946a 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -1606,7 +1606,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati std::ostringstream oss; bool first = true; - for (auto msg : error_msgs) { + for (const auto& msg : error_msgs) { if (!first) { oss << "\n "; } diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc index fde0a2cc00..d71ef547e0 100644 --- a/runtime/oat_file_manager.cc +++ b/runtime/oat_file_manager.cc @@ -398,7 +398,7 @@ static bool AreSharedLibrariesOk(const std::string shared_libraries, while (!temp.empty() && index < shared_libraries_split.size() - 1) { DexFileAndClassPair pair(temp.top()); const DexFile* dex_file = pair.GetDexFile(); - std::string dex_filename(dex_file->GetLocation()); + const std::string& dex_filename = dex_file->GetLocation(); uint32_t dex_checksum = dex_file->GetLocationChecksum(); if (dex_filename != shared_libraries_split[index] || dex_checksum != std::stoul(shared_libraries_split[index + 1])) { |