diff options
-rw-r--r-- | dex2oat/linker/oat_writer.cc | 2 | ||||
-rw-r--r-- | dex2oat/linker/oat_writer.h | 9 | ||||
-rw-r--r-- | dexopt_chroot_setup/dexopt_chroot_setup.cc | 2 | ||||
-rw-r--r-- | runtime/thread.cc | 2 | ||||
-rw-r--r-- | runtime/thread.h | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc index 68e0690766..1419338066 100644 --- a/dex2oat/linker/oat_writer.cc +++ b/dex2oat/linker/oat_writer.cc @@ -488,7 +488,7 @@ bool OatWriter::AddVdexDexFilesSource(const VdexFile& vdex_file, const char* loc } // Add dex file source from raw memory. -bool OatWriter::AddRawDexFileSource(std::shared_ptr<DexFileContainer> container, +bool OatWriter::AddRawDexFileSource(const std::shared_ptr<DexFileContainer>& container, const uint8_t* dex_file_begin, const char* location, uint32_t location_checksum) { diff --git a/dex2oat/linker/oat_writer.h b/dex2oat/linker/oat_writer.h index 43c9bc77ff..dc441a11d8 100644 --- a/dex2oat/linker/oat_writer.h +++ b/dex2oat/linker/oat_writer.h @@ -147,11 +147,10 @@ class OatWriter { File&& dex_file_fd, const char* location); // Add dex file source from raw memory. - bool AddRawDexFileSource( - std::shared_ptr<DexFileContainer> container, - const uint8_t* dex_file_begin, - const char* location, - uint32_t location_checksum); + bool AddRawDexFileSource(const std::shared_ptr<DexFileContainer>& container, + const uint8_t* dex_file_begin, + const char* location, + uint32_t location_checksum); // Add dex file source(s) from a vdex file. bool AddVdexDexFilesSource( const VdexFile& vdex_file, diff --git a/dexopt_chroot_setup/dexopt_chroot_setup.cc b/dexopt_chroot_setup/dexopt_chroot_setup.cc index b83088ea76..35343c5b3c 100644 --- a/dexopt_chroot_setup/dexopt_chroot_setup.cc +++ b/dexopt_chroot_setup/dexopt_chroot_setup.cc @@ -82,7 +82,7 @@ const NoDestructor<std::string> kBindMountTmpDir( constexpr mode_t kChrootDefaultMode = 0755; constexpr std::chrono::milliseconds kSnapshotCtlTimeout = std::chrono::seconds(60); -bool IsOtaUpdate(const std::optional<std::string> ota_slot) { return ota_slot.has_value(); } +bool IsOtaUpdate(const std::optional<std::string>& ota_slot) { return ota_slot.has_value(); } Result<void> Run(std::string_view log_name, const std::vector<std::string>& args) { LOG(INFO) << "Running " << log_name << ": " << Join(args, /*separator=*/" "); diff --git a/runtime/thread.cc b/runtime/thread.cc index 2ebbe1327d..c648f0f55c 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -4846,7 +4846,7 @@ int Thread::GetNativePriority() const { return priority; } -void Thread::AbortInThis(std::string message) { +void Thread::AbortInThis(const std::string& message) { std::string thread_name; Thread::Current()->GetThreadName(thread_name); LOG(ERROR) << message; diff --git a/runtime/thread.h b/runtime/thread.h index 943a7edff3..35e8fe8716 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -1550,7 +1550,7 @@ class EXPORT Thread { // checkpoint. Useful mostly to discover why a thread isn't responding to a suspend request or // checkpoint. The caller should "suspend" (in the Java sense) 'thread' before invoking this, so // 'thread' can't get deallocated before we access it. - NO_RETURN void AbortInThis(std::string message); + NO_RETURN void AbortInThis(const std::string& message); // Returns true if StrictMode events are traced for the current thread. static bool IsSensitiveThread() { |