refactor: replace util::Ref by std::any (C++17)

This commit is contained in:
Sebastian Falbesoner
2020-12-01 00:36:36 +01:00
parent 95cccf8a4b
commit 8dbb87a393
17 changed files with 77 additions and 82 deletions

View File

@@ -144,7 +144,7 @@ static bool RPCAuthorized(const std::string& strAuth, std::string& strAuthUserna
return multiUserAuthorized(strUserPass);
}
static bool HTTPReq_JSONRPC(const util::Ref& context, HTTPRequest* req)
static bool HTTPReq_JSONRPC(const std::any& context, HTTPRequest* req)
{
// JSONRPC handles only POST
if (req->GetRequestMethod() != HTTPRequest::POST) {
@@ -288,7 +288,7 @@ static bool InitRPCAuthentication()
return true;
}
bool StartHTTPRPC(const util::Ref& context)
bool StartHTTPRPC(const std::any& context)
{
LogPrint(BCLog::RPC, "Starting HTTP RPC server\n");
if (!InitRPCAuthentication())