summaryrefslogtreecommitdiffstats
path: root/monitor/fan.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2018-02-16 16:11:13 -0600
committerMatthew Barth <msbarth@us.ibm.com>2018-03-01 09:09:06 -0600
commit32affb9879b18226b3a026072ce1753f03b7ca58 (patch)
tree904d3601317005055d5b7c9a7e08ed6896d9733f /monitor/fan.cpp
parent069e4405a6926cdacc33c0826075356da2cd9dbd (diff)
downloadphosphor-fan-presence-32affb9879b18226b3a026072ce1753f03b7ca58.tar.gz
phosphor-fan-presence-32affb9879b18226b3a026072ce1753f03b7ca58.zip
optimize: Tach sensors as shared pointers
The fan and trust group objects should utilize shared pointers to the tach sensor objects. This allows optimizing the storage of additional attributes associated with the tach sensors. e.g. An attribute to declare which sensors should be included in the trust determination. Tested: Current trust group associations & reactions are unchanged Change-Id: I249cc7debf467e8275fae7fa157ce97078b40802 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'monitor/fan.cpp')
-rw-r--r--monitor/fan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp
index 637a3ca..256d0cb 100644
--- a/monitor/fan.cpp
+++ b/monitor/fan.cpp
@@ -47,7 +47,7 @@ Fan::Fan(Mode mode,
try
{
_sensors.emplace_back(
- std::make_unique<TachSensor>(
+ std::make_shared<TachSensor>(
mode,
bus,
*this,
OpenPOWER on IntegriCloud