Enforce const correctness

For all async calls, we should be consistently capturing non trivial
objects by const reference.  This corrects bmcweb to be consistent and
capture errors by const value, and objects by const reference.

Tested: Code compiles.  Trivial changes.

This saves about 300 bytes on our compressed binary size.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib3e0b6edef9803a1c480701556949488406305d4
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 78853a5..09bbd60 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -1611,7 +1611,7 @@
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code ec,
-                    std::vector<std::string>& objectPaths) {
+                    const std::vector<std::string>& objectPaths) {
             if (ec)
             {
                 setErrorResponse(asyncResp->res,
@@ -1622,7 +1622,7 @@
             {
                 asyncResp->res.jsonValue = {{"status", "ok"},
                                             {"message", "200 OK"},
-                                            {"data", std::move(objectPaths)}};
+                                            {"data", objectPaths}};
             }
         },
         "xyz.openbmc_project.ObjectMapper",
@@ -1642,12 +1642,12 @@
 
     crow::connections::systemBus->async_method_call(
         [objectPath, asyncResp](const boost::system::error_code ec,
-                                GetSubTreeType& objectNames) {
+                                const GetSubTreeType& objectNames) {
             auto transaction = std::make_shared<InProgressEnumerateData>(
                 objectPath, asyncResp);
 
             transaction->subtree =
-                std::make_shared<GetSubTreeType>(std::move(objectNames));
+                std::make_shared<GetSubTreeType>(objectNames);
 
             if (ec)
             {