summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-28 06:24:24 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-07-28 06:24:24 +0000
commit119d41c18e9a6ea7f04fd3fa65ab2016fb8c6ac9 (patch)
treef9cf69138e3b6899d354e0b8d8811ad70ed7b85d /healthd
parentb29e58eccfab1b1bb1133a7f2745dd5204e70346 (diff)
parentb66b16b39aefd95a87a70d2ebf5b7f6697c3498c (diff)
downloadcore-119d41c18e9a6ea7f04fd3fa65ab2016fb8c6ac9.tar.gz
core-119d41c18e9a6ea7f04fd3fa65ab2016fb8c6ac9.tar.bz2
core-119d41c18e9a6ea7f04fd3fa65ab2016fb8c6ac9.zip
Merge \"Fix clang-tidy performance warnings in healthd.\"
am: b66b16b39a Change-Id: I1263c6557128d71dd4208d6a4d6974572d8362a3
Diffstat (limited to 'healthd')
-rw-r--r--healthd/BatteryPropertiesRegistrar.cpp2
-rw-r--r--healthd/BatteryPropertiesRegistrar.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/healthd/BatteryPropertiesRegistrar.cpp b/healthd/BatteryPropertiesRegistrar.cpp
index 5d1fa52b1..d28ba41ff 100644
--- a/healthd/BatteryPropertiesRegistrar.cpp
+++ b/healthd/BatteryPropertiesRegistrar.cpp
@@ -35,7 +35,7 @@ void BatteryPropertiesRegistrar::publish(
defaultServiceManager()->addService(String16("batteryproperties"), service);
}
-void BatteryPropertiesRegistrar::notifyListeners(struct BatteryProperties props) {
+void BatteryPropertiesRegistrar::notifyListeners(const struct BatteryProperties& props) {
Mutex::Autolock _l(mRegistrationLock);
for (size_t i = 0; i < mListeners.size(); i++) {
mListeners[i]->batteryPropertiesChanged(props);
diff --git a/healthd/BatteryPropertiesRegistrar.h b/healthd/BatteryPropertiesRegistrar.h
index d17e4a327..095f3d37c 100644
--- a/healthd/BatteryPropertiesRegistrar.h
+++ b/healthd/BatteryPropertiesRegistrar.h
@@ -31,7 +31,7 @@ class BatteryPropertiesRegistrar : public BnBatteryPropertiesRegistrar,
public IBinder::DeathRecipient {
public:
void publish(const sp<BatteryPropertiesRegistrar>& service);
- void notifyListeners(struct BatteryProperties props);
+ void notifyListeners(const struct BatteryProperties& props);
private:
Mutex mRegistrationLock;