mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Remove unnecessary copy from BackupContainerAzureBlobStoreImpl::read
This commit is contained in:
parent
c8950490be
commit
e7e2439abe
@ -44,7 +44,7 @@ public:
|
||||
blobName = this->blobName, data, length, offset] {
|
||||
std::ostringstream oss(std::ios::out | std::ios::binary);
|
||||
client->download_blob_to_stream(containerName, blobName, offset, length, oss);
|
||||
auto str = oss.str();
|
||||
auto str = std::move(oss).str();
|
||||
memcpy(data, str.c_str(), str.size());
|
||||
return static_cast<int>(str.size());
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user