From 32affb9879b18226b3a026072ce1753f03b7ca58 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Fri, 16 Feb 2018 16:11:13 -0600 Subject: 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 --- monitor/fan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monitor/fan.cpp') 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( + std::make_shared( mode, bus, *this, -- cgit v1.2.1