mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Remove unnecessary branches in utilstrencodings string constructors.
This commit is contained in:
parent
e19db7b5ad
commit
4b1c0f2e2e
@ -228,7 +228,7 @@ std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
|
|||||||
std::string DecodeBase64(const std::string& str)
|
std::string DecodeBase64(const std::string& str)
|
||||||
{
|
{
|
||||||
std::vector<unsigned char> vchRet = DecodeBase64(str.c_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)
|
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::string DecodeBase32(const std::string& str)
|
||||||
{
|
{
|
||||||
std::vector<unsigned char> vchRet = DecodeBase32(str.c_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)
|
static bool ParsePrechecks(const std::string& str)
|
||||||
|
Loading…
Reference in New Issue
Block a user