libstore: remove curlFileTransfer::enqueueItem return type
it's used only once, and the transfer is used for something else
afterwards as well. returning it hides that the same transfer is
being returned unchanged, and pointlessly extends the signature.
Change-Id: Idbd0af00f9aebd3606f6b537b9b7cc9263a45cf7
This commit is contained in:
parent
60e984f0cf
commit
1338e93bc9
|
@ -712,7 +712,7 @@ struct curlFileTransfer : public FileTransfer
|
|||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<TransferItem> enqueueItem(std::shared_ptr<TransferItem> item)
|
||||
void enqueueItem(std::shared_ptr<TransferItem> item)
|
||||
{
|
||||
if (item->uploadData
|
||||
&& !item->uri.starts_with("http://")
|
||||
|
@ -726,7 +726,6 @@ struct curlFileTransfer : public FileTransfer
|
|||
state->incoming.push(item);
|
||||
}
|
||||
wakeup();
|
||||
return item;
|
||||
}
|
||||
|
||||
#if ENABLE_S3
|
||||
|
@ -857,7 +856,7 @@ struct curlFileTransfer : public FileTransfer
|
|||
|
||||
auto _state = std::make_shared<Sync<State>>();
|
||||
|
||||
auto item = enqueueItem(std::make_shared<TransferItem>(
|
||||
auto item = std::make_shared<TransferItem>(
|
||||
*this,
|
||||
uri,
|
||||
headers,
|
||||
|
@ -888,7 +887,8 @@ struct curlFileTransfer : public FileTransfer
|
|||
},
|
||||
std::move(data),
|
||||
noBody
|
||||
));
|
||||
);
|
||||
enqueueItem(item);
|
||||
|
||||
struct TransferSource : Source
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue