error_messages: Use int64_t in invalidIndex
Using int64_t instead of int, to permit 64-bit indices.
This is to support ExternalStorer, a new project I am working on,
which uses a 64-bit sequence number for long-term robustness.
Change-Id: I00121933067030fd722f6b02c2d2dbd1854dff1c
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index c9a919a..5bee7b0 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -785,9 +785,9 @@
* @param[in] arg1 Parameter of message that will replace %1 in its body.
*
* @returns Message InvalidIndex formatted to JSON */
-nlohmann::json invalidIndex(const int& arg1);
+nlohmann::json invalidIndex(int64_t arg1);
-void invalidIndex(crow::Response& res, const int& arg1);
+void invalidIndex(crow::Response& res, int64_t arg1);
/**
* @brief Formats EmptyJSON message into JSON
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index cb4d69c..3fd48a2 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1750,7 +1750,7 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json invalidIndex(const int& arg1)
+nlohmann::json invalidIndex(int64_t arg1)
{
return nlohmann::json{
{"@odata.type", "#Message.v1_1_1.Message"},
@@ -1763,7 +1763,7 @@
"bounds of the array."}};
}
-void invalidIndex(crow::Response& res, const int& arg1)
+void invalidIndex(crow::Response& res, int64_t arg1)
{
res.result(boost::beast::http::status::bad_request);
addMessageToErrorJson(res.jsonValue, invalidIndex(arg1));