Replace string copies with const-ref am: 121fedaa46 am: e331953c90

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2869314

Change-Id: Id2c0b42c43cedcc48368cd266a696cfdc31d8ade
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Seth Moore 2023-12-11 22:45:31 +00:00 committed by Automerger Merge Worker
commit dc5d0250c6
2 changed files with 5 additions and 4 deletions

View file

@ -17,6 +17,7 @@
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h"
@ -129,8 +130,8 @@ struct JsonOutput {
* "name": <string>
* }
*/
JsonOutput jsonEncodeCsrWithBuild(const std::string instance_name,
const cppbor::Array& csr, const std::string serialno_prop);
JsonOutput jsonEncodeCsrWithBuild(const std::string& instance_name, const cppbor::Array& csr,
const std::string& serialno_prop);
/**
* Parses a DeviceInfo structure from the given CBOR data. The parsed data is then validated to

View file

@ -337,8 +337,8 @@ ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
return result;
}
JsonOutput jsonEncodeCsrWithBuild(const std::string instance_name, const cppbor::Array& csr,
const std::string serialno_prop) {
JsonOutput jsonEncodeCsrWithBuild(const std::string& instance_name, const cppbor::Array& csr,
const std::string& serialno_prop) {
const std::string kFingerprintProp = "ro.build.fingerprint";
if (!::android::base::WaitForPropertyCreation(kFingerprintProp)) {