From 2999a9cd7082e4a95a6f0fca020f3d0a1192b26c Mon Sep 17 00:00:00 2001 From: Phoenix / Hotaru Date: Sun, 9 Jul 2023 03:50:27 +0100 Subject: [PATCH] [MasterServer] Remove Duplicate const for escaping --- apps/master/RestServer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/master/RestServer.cpp b/apps/master/RestServer.cpp index 56dc7ca21..deede40a6 100644 --- a/apps/master/RestServer.cpp +++ b/apps/master/RestServer.cpp @@ -33,7 +33,6 @@ inline void ptreeToServer(boost::property_tree::ptree &pt, MasterServer::SServer inline std::string escapeString(const std::string &str) { const std::string escapeChars = "\"\\/\b\f\n\r\t"; - const std::string escapeSequences = "\"\\/\b\f\n\r\t"; std::stringstream ss; for (char c : str) @@ -41,7 +40,7 @@ inline std::string escapeString(const std::string &str) size_t found = escapeChars.find(c); if (found != std::string::npos) { - ss << '\\' << escapeSequences[found]; + ss << '\\' << escapeChars[found]; } else {