From 7d9d134bf95cb6a2ce9623c7e6a3535432a61af2 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 16 Jan 2014 16:15:27 +0100 Subject: 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. --- src/rpcprotocol.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rpcprotocol.cpp') diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp index 4a2241edaa..0632bdae6f 100644 --- a/src/rpcprotocol.cpp +++ b/src/rpcprotocol.cpp @@ -81,7 +81,7 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive) "\r\n" "\r\n" "

401 Unauthorized.

\r\n" - "\r\n", rfc1123Time().c_str(), FormatFullVersion().c_str()); + "\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& stream, int &proto, -- cgit v1.2.3