refactor: tr_web's callback now uses std::string_view (#2172)

* refactor: tr_web tasks now use a std::string_view argument
This commit is contained in:
Charles Kerr
2021-11-15 12:10:18 -06:00
committed by GitHub
parent 54cd1a2612
commit cef3f43088
7 changed files with 23 additions and 37 deletions

View File

@@ -142,12 +142,11 @@ static void onTorrentFileDownloaded(
bool /*did_connect*/,
bool /*did_timeout*/,
long /*response_code*/,
void const* response,
size_t response_byte_count,
std::string_view response,
void* vctor)
{
auto* ctor = static_cast<tr_ctor*>(vctor);
tr_ctorSetMetainfo(ctor, response, response_byte_count);
tr_ctorSetMetainfo(ctor, std::data(response), std::size(response));
waitingOnWeb = false;
}