From 82297c6a0278a8a97a30cc9f18ac237336f71047 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 23 Jan 2015 17:17:34 -0800 Subject: [PATCH] Windows compile fix. --- libweb3jsonrpc/CorsHttpServer.cpp | 7 +++---- libweb3jsonrpc/CorsHttpServer.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libweb3jsonrpc/CorsHttpServer.cpp b/libweb3jsonrpc/CorsHttpServer.cpp index 0ba5083ef..d0e0f8112 100644 --- a/libweb3jsonrpc/CorsHttpServer.cpp +++ b/libweb3jsonrpc/CorsHttpServer.cpp @@ -24,12 +24,12 @@ namespace jsonrpc { -int HttpServer::callback(struct mg_connection *conn) +int HttpServer::callback(struct mg_connection*) { - + return 0; } -bool CorsHttpServer::SendResponse(const std::string& _response, void* _addInfo) +bool CorsHttpServer::SendResponse(std::string const& _response, void* _addInfo) { struct mg_connection* conn = (struct mg_connection*) _addInfo; if (mg_printf(conn, "HTTP/1.1 200 OK\r\n" @@ -41,7 +41,6 @@ bool CorsHttpServer::SendResponse(const std::string& _response, void* _addInfo) "%s",(int)_response.length(), _response.c_str()) > 0) return true; return false; - } } diff --git a/libweb3jsonrpc/CorsHttpServer.h b/libweb3jsonrpc/CorsHttpServer.h index 706a7b374..09c9f6516 100644 --- a/libweb3jsonrpc/CorsHttpServer.h +++ b/libweb3jsonrpc/CorsHttpServer.h @@ -24,11 +24,11 @@ namespace jsonrpc { -class CorsHttpServer : public HttpServer +class CorsHttpServer: public HttpServer { public: using HttpServer::HttpServer; - bool virtual SendResponse(const std::string& _response, void* _addInfo = NULL); + bool virtual SendResponse(std::string const& _response, void* _addInfo = NULL); }; }