refactor: [qt] Use SpanReader to avoid two vector copies
This commit is contained in:
1 file changed
+1
-2
@@ -189,8 +189,7 @@ void RecentRequestsTableModel::addNewRequest(const SendCoinsRecipient &recipient
|
|||||||
// called from ctor when loading from wallet
|
// called from ctor when loading from wallet
|
||||||
void RecentRequestsTableModel::addNewRequest(const std::string &recipient)
|
void RecentRequestsTableModel::addNewRequest(const std::string &recipient)
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> data(recipient.begin(), recipient.end());
|
SpanReader ss{MakeByteSpan(recipient)};
|
||||||
DataStream ss{data};
|
|
||||||
|
|
||||||
RecentRequestEntry entry;
|
RecentRequestEntry entry;
|
||||||
ss >> entry;
|
ss >> entry;
|
||||||
|
|||||||
Reference in new issue
Block a user