From 26ab33b5244c9f7a0a522376c51c3921aff820e2 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:10:01 -0400 Subject: [PATCH] Add const to string to convert --- src/ReturnCodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReturnCodes.cpp b/src/ReturnCodes.cpp index f43ee05..b367ead 100644 --- a/src/ReturnCodes.cpp +++ b/src/ReturnCodes.cpp @@ -68,7 +68,7 @@ std::string GetReturnStatus(const int code) { * @return A status message corresponding to the input code. ******************************************************************************/ char *GetReturnStatusCharArray(const int code) { - std::string msg = GetReturnStatus(code); + const std::string msg = GetReturnStatus(code); char *c_msg = new char[msg.size() + 1]; #ifndef _WIN32 strcpy_s(c_msg, msg.size() + 1, msg.c_str());