mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Remove redundant .c_str()s
After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
This commit is contained in:
parent
b77dfdc9e3
commit
7d9d134bf9
22 changed files with 236 additions and 236 deletions
|
|
@ -81,7 +81,7 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
|
|||
"<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>\r\n"
|
||||
"</HEAD>\r\n"
|
||||
"<BODY><H1>401 Unauthorized.</H1></BODY>\r\n"
|
||||
"</HTML>\r\n", rfc1123Time().c_str(), FormatFullVersion().c_str());
|
||||
"</HTML>\r\n", rfc1123Time(), FormatFullVersion());
|
||||
const char *cStatus;
|
||||
if (nStatus == HTTP_OK) cStatus = "OK";
|
||||
else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request";
|
||||
|
|
@ -100,11 +100,11 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
|
|||
"%s",
|
||||
nStatus,
|
||||
cStatus,
|
||||
rfc1123Time().c_str(),
|
||||
rfc1123Time(),
|
||||
keepalive ? "keep-alive" : "close",
|
||||
strMsg.size(),
|
||||
FormatFullVersion().c_str(),
|
||||
strMsg.c_str());
|
||||
FormatFullVersion(),
|
||||
strMsg);
|
||||
}
|
||||
|
||||
bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue