diff options
author | 2025-03-21 09:28:36 -0700 | |
---|---|---|
committer | 2025-03-21 09:28:36 -0700 | |
commit | 4f5fa2777a72f91723dd68ff49f157eed989b698 (patch) | |
tree | ab4022e422be8ec0fd5a33a353c03b9961fe0887 | |
parent | d62d66437f3b322f202c314672fbaf810fde7142 (diff) | |
parent | 4f163f8c78d545603474d032cd2b587dec289f04 (diff) |
Pass filename by reference. am: 4f163f8c78
Original change: https://android-review.googlesource.com/c/platform/art/+/3556516
Change-Id: I2c7a54eead3661cc92ec0bc02b284e29eab6b5ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | runtime/oat/sdc_file.cc | 2 | ||||
-rw-r--r-- | runtime/oat/sdc_file.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/oat/sdc_file.cc b/runtime/oat/sdc_file.cc index 59b9655ac2..e141aea85e 100644 --- a/runtime/oat/sdc_file.cc +++ b/runtime/oat/sdc_file.cc @@ -36,7 +36,7 @@ using ::android::base::ParseInt; using ::android::base::ReadFileToString; using ::android::base::WriteStringToFd; -std::unique_ptr<SdcReader> SdcReader::Load(const std::string filename, std::string* error_msg) { +std::unique_ptr<SdcReader> SdcReader::Load(const std::string& filename, std::string* error_msg) { std::unique_ptr<SdcReader> reader(new SdcReader()); // The sdc file is supposed to be small, so read fully into memory for simplicity. diff --git a/runtime/oat/sdc_file.h b/runtime/oat/sdc_file.h index 73917f5316..e2c9b43ba7 100644 --- a/runtime/oat/sdc_file.h +++ b/runtime/oat/sdc_file.h @@ -45,7 +45,7 @@ namespace art HIDDEN { // Repeated keys are not allowed. This is an extensible format, so versioning is not needed. class EXPORT SdcReader { public: - static std::unique_ptr<SdcReader> Load(const std::string filename, std::string* error_msg); + static std::unique_ptr<SdcReader> Load(const std::string& filename, std::string* error_msg); // The mtime of the SDM file on device, in nanoseconds. // This is for detecting obsolete SDC files. |