Merge pull request #7 from HotaruBlaze/MasterServer-Cleanup

[MasterServer] Remove Duplicate const for escapeString
pull/655/head
Phoenix / Hotaru 10 months ago committed by GitHub
commit 4763a46364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
{

Loading…
Cancel
Save