Remove std::unique_ptr from ByteArraySink

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2026-02-18 09:07:03 +00:00
parent 316121ba8f
commit 1ac986b7c8
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
5 changed files with 17 additions and 23 deletions

View file

@ -70,8 +70,9 @@ auto Download::makeByteArray(QUrl url, Options options) -> std::pair<Download::P
dl->setObjectName(QString("BYTES:") + url.toString());
dl->m_options = options;
auto response = new QByteArray();
dl->m_sink = std::make_unique<ByteArraySink>(std::unique_ptr<QByteArray>{ response });
auto sink = std::make_unique<ByteArraySink>();
QByteArray* response = sink->output();
dl->m_sink = std::move(sink);
return { dl, response };
}