diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-23 17:25:12 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-23 17:25:39 +0100 |
commit | 6403c6c835a3302a6ee575576be93e4104a39685 (patch) | |
tree | eeca53e065947846648d9373f240d593c0c0ecfc /src/protocol.cpp | |
parent | 53e9d3aa44e24fecd2d58984baff3cb4af23c12e (diff) | |
parent | 7d9d134bf95cb6a2ce9623c7e6a3535432a61af2 (diff) |
Merge pull request #3549
7d9d134 Remove redundant .c_str()s (Wladimir J. van der Laan)
b77dfdc Typesafe strprintf/error/LogPrint functions (Wladimir J. van der Laan)
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index be835507ab..cc98e7e40c 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -67,7 +67,7 @@ bool CMessageHeader::IsValid() const // Message size if (nMessageSize > MAX_SIZE) { - LogPrintf("CMessageHeader::IsValid() : (%s, %u bytes) nMessageSize > MAX_SIZE\n", GetCommand().c_str(), nMessageSize); + LogPrintf("CMessageHeader::IsValid() : (%s, %u bytes) nMessageSize > MAX_SIZE\n", GetCommand(), nMessageSize); return false; } @@ -118,7 +118,7 @@ CInv::CInv(const std::string& strType, const uint256& hashIn) } } if (i == ARRAYLEN(ppszTypeName)) - throw std::out_of_range(strprintf("CInv::CInv(string, uint256) : unknown type '%s'", strType.c_str())); + throw std::out_of_range(strprintf("CInv::CInv(string, uint256) : unknown type '%s'", strType)); hash = hashIn; } @@ -141,11 +141,11 @@ const char* CInv::GetCommand() const std::string CInv::ToString() const { - return strprintf("%s %s", GetCommand(), hash.ToString().c_str()); + return strprintf("%s %s", GetCommand(), hash.ToString()); } void CInv::print() const { - LogPrintf("CInv(%s)\n", ToString().c_str()); + LogPrintf("CInv(%s)\n", ToString()); } |