replace pointer parameters with references

The methods declared in sensorhandler.hpp are all defined with
pointer parameters. Since these parameters should always be valid and
not null, using raw pointers is unnecessary and can be misleading, so
passing them as references makes the API safer and more idiomatic in
modern C++.

Change-Id: Iaec6caeb1e04fcc38cc244dd66634724c62dd0c1
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 60b5c9a..805ebcb 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -71,7 +71,7 @@
     sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
     GetSensorResponse response{};
 
-    enableScanning(&response);
+    enableScanning(response);
 
     auto service = ipmi::getService(bus, interface, path);
 
@@ -90,7 +90,7 @@
                 {
                     if (propValue == value.second.assert)
                     {
-                        setOffset(value.first, &response);
+                        setOffset(value.first, response);
                         break;
                     }
                 }
@@ -114,7 +114,7 @@
     sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
     GetSensorResponse response{};
 
-    enableScanning(&response);
+    enableScanning(response);
 
     auto service = ipmi::getService(bus, sensorInfo.sensorInterface,
                                     sensorInfo.sensorPath);
@@ -134,7 +134,7 @@
                 {
                     if (propValue == value.second.assert)
                     {
-                        setReading(value.first, &response);
+                        setReading(value.first, response);
                         break;
                     }
                 }