Remove useless string initialization.
This commit is contained in:
parent
f4f4f51f1a
commit
19ac86e206
5 changed files with 7 additions and 7 deletions
|
@ -139,7 +139,7 @@ bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault,
|
||||||
if (pszName[0] == 0)
|
if (pszName[0] == 0)
|
||||||
return false;
|
return false;
|
||||||
int port = portDefault;
|
int port = portDefault;
|
||||||
std::string hostname = "";
|
std::string hostname;
|
||||||
SplitHostPort(std::string(pszName), port, hostname);
|
SplitHostPort(std::string(pszName), port, hostname);
|
||||||
|
|
||||||
std::vector<CNetAddr> vIP;
|
std::vector<CNetAddr> vIP;
|
||||||
|
|
|
@ -90,7 +90,7 @@ static enum RetFormat ParseDataFormat(std::string& param, const std::string& str
|
||||||
|
|
||||||
static std::string AvailableDataFormatsString()
|
static std::string AvailableDataFormatsString()
|
||||||
{
|
{
|
||||||
std::string formats = "";
|
std::string formats;
|
||||||
for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
|
for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
|
||||||
if (strlen(rf_names[i].name) > 0) {
|
if (strlen(rf_names[i].name) > 0) {
|
||||||
formats.append(".");
|
formats.append(".");
|
||||||
|
|
|
@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
|
||||||
ipv4Addr.s_addr = 0xa0b0c001;
|
ipv4Addr.s_addr = 0xa0b0c001;
|
||||||
|
|
||||||
CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK);
|
CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK);
|
||||||
std::string pszDest = "";
|
std::string pszDest;
|
||||||
bool fInboundIn = false;
|
bool fInboundIn = false;
|
||||||
|
|
||||||
// Test that fFeeler is false by default.
|
// Test that fFeeler is false by default.
|
||||||
|
|
|
@ -127,7 +127,7 @@ std::string EncodeBase64(const unsigned char* pch, size_t len)
|
||||||
{
|
{
|
||||||
static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
|
||||||
std::string strRet = "";
|
std::string strRet;
|
||||||
strRet.reserve((len+2)/3*4);
|
strRet.reserve((len+2)/3*4);
|
||||||
|
|
||||||
int mode=0, left=0;
|
int mode=0, left=0;
|
||||||
|
@ -267,7 +267,7 @@ std::string EncodeBase32(const unsigned char* pch, size_t len)
|
||||||
{
|
{
|
||||||
static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567";
|
static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567";
|
||||||
|
|
||||||
std::string strRet="";
|
std::string strRet;
|
||||||
strRet.reserve((len+4)/5*8);
|
strRet.reserve((len+4)/5*8);
|
||||||
|
|
||||||
int mode=0, left=0;
|
int mode=0, left=0;
|
||||||
|
|
|
@ -279,7 +279,7 @@ UniValue importaddress(const JSONRPCRequest& request)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
std::string strLabel = "";
|
std::string strLabel;
|
||||||
if (!request.params[1].isNull())
|
if (!request.params[1].isNull())
|
||||||
strLabel = request.params[1].get_str();
|
strLabel = request.params[1].get_str();
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ UniValue importpubkey(const JSONRPCRequest& request)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
std::string strLabel = "";
|
std::string strLabel;
|
||||||
if (!request.params[1].isNull())
|
if (!request.params[1].isNull())
|
||||||
strLabel = request.params[1].get_str();
|
strLabel = request.params[1].get_str();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue