mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix some inefficiecies.
This commit is contained in:
@@ -176,7 +176,7 @@ protected:
|
||||
memset(&vchData[0], 0, vchData.size());
|
||||
}
|
||||
|
||||
void SetData(int nVersionIn, std::vector<unsigned char> vchDataIn)
|
||||
void SetData(int nVersionIn, const std::vector<unsigned char>& vchDataIn)
|
||||
{
|
||||
nVersion = nVersionIn;
|
||||
vchData = vchDataIn;
|
||||
@@ -186,7 +186,7 @@ protected:
|
||||
{
|
||||
nVersion = nVersionIn;
|
||||
vchData.resize(nSize);
|
||||
if (!vchData.empty())
|
||||
if (nSize)
|
||||
memcpy(&vchData[0], pdata, nSize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user