use structured binding declarations
Shorter. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:

committed by
Max Kellermann

parent
da642b2890
commit
44378b7dbe
@@ -402,8 +402,8 @@ CurlInputStream::CurlInputStream(EventLoop &event_loop, const char *_url,
|
||||
{
|
||||
request_headers.Append("Icy-Metadata: 1");
|
||||
|
||||
for (const auto &i : headers)
|
||||
request_headers.Append((i.first + ":" + i.second).c_str());
|
||||
for (const auto &[key, header] : headers)
|
||||
request_headers.Append((key + ":" + header).c_str());
|
||||
}
|
||||
|
||||
CurlInputStream::~CurlInputStream() noexcept
|
||||
|
@@ -174,8 +174,8 @@ QobuzClient::MakeUrl(const char *object, const char *method,
|
||||
uri += method;
|
||||
|
||||
QueryStringBuilder q;
|
||||
for (const auto &i : query)
|
||||
q(uri, i.first.c_str(), i.second.c_str());
|
||||
for (const auto &[key, url] : query)
|
||||
q(uri, key.c_str(), url.c_str());
|
||||
|
||||
q(uri, "app_id", app_id);
|
||||
return uri;
|
||||
@@ -195,11 +195,11 @@ QobuzClient::MakeSignedUrl(const char *object, const char *method,
|
||||
QueryStringBuilder q;
|
||||
std::string concatenated_query(object);
|
||||
concatenated_query += method;
|
||||
for (const auto &i : query) {
|
||||
q(uri, i.first.c_str(), i.second.c_str());
|
||||
for (const auto &[key, url] : query) {
|
||||
q(uri, key.c_str(), url.c_str());
|
||||
|
||||
concatenated_query += i.first;
|
||||
concatenated_query += i.second;
|
||||
concatenated_query += key;
|
||||
concatenated_query += url;
|
||||
}
|
||||
|
||||
q(uri, "app_id", app_id);
|
||||
|
Reference in New Issue
Block a user