summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Chang <cweichun@google.com>2023-11-05 23:38:57 +0000
committerJohn Chang <cweichun@google.com>2023-11-21 01:14:09 +0000
commit9cf39be52b920184921c426976d5a5136f91bec9 (patch)
tree04e9e6f0ac6f5a95d0a7ccea9a51b869d9e01108
parentc356eea6121f60185c72b10e0e68dcbfd6c3b97e (diff)
downloadgs201-9cf39be52b920184921c426976d5a5136f91bec9.tar.gz
histogram: avoid copying by passing a constant reference.
Bug: 301286479 Test: build completed successfully Change-Id: I1a36bcefb718362187218bdd4a39bdd6c7862afc
-rw-r--r--histogram/histogram.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/histogram/histogram.h b/histogram/histogram.h
index a7b41ce..abb36d8 100644
--- a/histogram/histogram.h
+++ b/histogram/histogram.h
@@ -28,7 +28,7 @@ class IDLHistogram : public HistogramInfo {
public:
IDLHistogram() : HistogramInfo(HistogramType::HISTOGRAM_HIDL) {}
virtual ~IDLHistogram() {}
- virtual void setHistogramPos(HistogramPos pos) {
+ virtual void setHistogramPos(const HistogramPos& pos) {
std::unique_lock<std::mutex> lk(mSetHistInfoMutex);
mHistogramPos = pos;
}