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.cpp b/pid/thermalcontroller.cpp
index d7ea5ae..f9d1e11 100644
--- a/pid/thermalcontroller.cpp
+++ b/pid/thermalcontroller.cpp
@@ -21,7 +21,8 @@
 
 std::unique_ptr<PIDController> ThermalController::CreateThermalPid(
     ZoneInterface* owner, const std::string& id,
-    const std::vector<std::string>& inputs, float setpoint, ec::pidinfo initial)
+    const std::vector<std::string>& inputs, float setpoint,
+    const ec::pidinfo& initial)
 {
     // ThermalController currently only supports precisely one input.
     if (inputs.size() != 1)
@@ -34,7 +35,7 @@
     ec::pid_info_t* info = thermal->get_pid_info();
     thermal->set_setpoint(setpoint);
 
-    InitializePIDStruct(info, &initial);
+    InitializePIDStruct(info, initial);
 
     return thermal;
 }