aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-12-17 19:21:20 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-12-17 19:21:48 +0100
commit4444b879bc1da56fffa4cb4cf31a276a795f43b9 (patch)
tree5f813b0ccb61f82a271736eda2ee078b0270068c /src
parent89802fe3eea857bae3a4f4f393de92af0915facd (diff)
parent7c8e4c5cfb3dd88bbe89cc14b703d7c59bafed6e (diff)
Merge pull request #5484
7c8e4c5 Make pass-by-ref arguments const. (Daniel Kraft)
Diffstat (limited to 'src')
-rw-r--r--src/rest.cpp28
-rw-r--r--src/rpcserver.h4
2 files changed, 16 insertions, 16 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 304e1d747a..69e6c08886 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -90,8 +90,8 @@ static bool ParseHashStr(const string& strReq, uint256& v)
}
static bool rest_headers(AcceptedConnection* conn,
- string& strReq,
- map<string, string>& mapHeaders,
+ const std::string& strReq,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun)
{
vector<string> params;
@@ -153,8 +153,8 @@ static bool rest_headers(AcceptedConnection* conn,
}
static bool rest_block(AcceptedConnection* conn,
- string& strReq,
- map<string, string>& mapHeaders,
+ const std::string& strReq,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun,
bool showTxDetails)
{
@@ -211,24 +211,24 @@ static bool rest_block(AcceptedConnection* conn,
}
static bool rest_block_extended(AcceptedConnection* conn,
- string& strReq,
- map<string, string>& mapHeaders,
+ const std::string& strReq,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun)
{
return rest_block(conn, strReq, mapHeaders, fRun, true);
}
static bool rest_block_notxdetails(AcceptedConnection* conn,
- string& strReq,
- map<string, string>& mapHeaders,
+ const std::string& strReq,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun)
{
return rest_block(conn, strReq, mapHeaders, fRun, false);
}
static bool rest_tx(AcceptedConnection* conn,
- string& strReq,
- map<string, string>& mapHeaders,
+ const std::string& strReq,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun)
{
vector<string> params;
@@ -280,8 +280,8 @@ static bool rest_tx(AcceptedConnection* conn,
static const struct {
const char* prefix;
bool (*handler)(AcceptedConnection* conn,
- string& strURI,
- map<string, string>& mapHeaders,
+ const std::string& strURI,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun);
} uri_prefixes[] = {
{"/rest/tx/", rest_tx},
@@ -291,8 +291,8 @@ static const struct {
};
bool HTTPReq_REST(AcceptedConnection* conn,
- string& strURI,
- map<string, string>& mapHeaders,
+ const std::string& strURI,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun)
{
try {
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 2b2428445d..8fea38126c 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -227,8 +227,8 @@ extern json_spirit::Value reconsiderblock(const json_spirit::Array& params, bool
// in rest.cpp
extern bool HTTPReq_REST(AcceptedConnection *conn,
- std::string& strURI,
- std::map<std::string, std::string>& mapHeaders,
+ const std::string& strURI,
+ const std::map<std::string, std::string>& mapHeaders,
bool fRun);
#endif // BITCOIN_RPCSERVER_H