diff options
author | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-03-28 11:17:07 -0400 |
---|---|---|
committer | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-07-08 13:33:01 -0700 |
commit | 4b1c0f2e2e870a3285811bd7b68e14c2edd6a827 (patch) | |
tree | c955f56037107e3a4a84d425f7490b8a3b78f2bf /src | |
parent | e19db7b5ad6af770d803e7120e21fba4b436e8be (diff) |
Remove unnecessary branches in utilstrencodings string constructors.
Diffstat (limited to 'src')
-rw-r--r-- | src/utilstrencodings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index feaf1a5e8b..2fabb8cf7a 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -228,7 +228,7 @@ std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid) std::string DecodeBase64(const std::string& str) { std::vector<unsigned char> vchRet = DecodeBase64(str.c_str()); - return (vchRet.size() == 0) ? std::string() : std::string((const char*)vchRet.data(), vchRet.size()); + return std::string((const char*)vchRet.data(), vchRet.size()); } std::string EncodeBase32(const unsigned char* pch, size_t len) @@ -415,7 +415,7 @@ std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid) std::string DecodeBase32(const std::string& str) { std::vector<unsigned char> vchRet = DecodeBase32(str.c_str()); - return (vchRet.size() == 0) ? std::string() : std::string((const char*) vchRet.data(), vchRet.size()); + return std::string((const char*)vchRet.data(), vchRet.size()); } static bool ParsePrechecks(const std::string& str) |