mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Refactor: Remove using namespace <xxx> from rpc/
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
#include <stdint.h>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
|
||||
* but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
|
||||
@@ -26,7 +24,7 @@ using namespace std;
|
||||
* 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
|
||||
*/
|
||||
|
||||
UniValue JSONRPCRequestObj(const string& strMethod, const UniValue& params, const UniValue& id)
|
||||
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id)
|
||||
{
|
||||
UniValue request(UniValue::VOBJ);
|
||||
request.push_back(Pair("method", strMethod));
|
||||
@@ -47,13 +45,13 @@ UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const Un
|
||||
return reply;
|
||||
}
|
||||
|
||||
string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id)
|
||||
std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id)
|
||||
{
|
||||
UniValue reply = JSONRPCReplyObj(result, error, id);
|
||||
return reply.write() + "\n";
|
||||
}
|
||||
|
||||
UniValue JSONRPCError(int code, const string& message)
|
||||
UniValue JSONRPCError(int code, const std::string& message)
|
||||
{
|
||||
UniValue error(UniValue::VOBJ);
|
||||
error.push_back(Pair("code", code));
|
||||
|
||||
Reference in New Issue
Block a user