cleanup: move from copy and pointer to just const reference
Originally code passed the object by value, and then later by pointer to
that copy. Convert the code to be more performant by using a const
reference at all layers of access for this object.
Change-Id: Icdf0dfdb54d8adc29af4d05d841533626a484921
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/thermalcontroller.hpp b/pid/thermalcontroller.hpp
index e38938f..9b2da71 100644
--- a/pid/thermalcontroller.hpp
+++ b/pid/thermalcontroller.hpp
@@ -17,7 +17,7 @@
static std::unique_ptr<PIDController>
CreateThermalPid(ZoneInterface* owner, const std::string& id,
const std::vector<std::string>& inputs, float setpoint,
- ec::pidinfo initial);
+ const ec::pidinfo& initial);
ThermalController(const std::string& id,
const std::vector<std::string>& inputs,