aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.cpp
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-01-04 13:22:19 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-03-08 08:07:55 -0800
commitf3c264e9a6deaa12e89faa783d3c7c99b945f18e (patch)
treee7dddfc1c89f95d2045b13e197508dce7101c2b9 /src/rpc/protocol.cpp
parent6996e066b538f03b8aa1f617dbb959b57ff6e727 (diff)
Refactor: Remove using namespace <xxx> from rpc/
Diffstat (limited to 'src/rpc/protocol.cpp')
-rw-r--r--src/rpc/protocol.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp
index dc710d939f..2be1edb5a6 100644
--- a/src/rpc/protocol.cpp
+++ b/src/rpc/protocol.cpp
@@ -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));