| Index: src/DefaultWebRequestCurl.cpp |
| =================================================================== |
| --- a/src/DefaultWebRequestCurl.cpp |
| +++ b/src/DefaultWebRequestCurl.cpp |
| @@ -139,29 +139,27 @@ AdblockPlus::ServerResponse AdblockPlus: |
| curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ReceiveData); |
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, &responseText); |
| // Request compressed data. Using any supported aglorithm |
| curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, ""); |
| curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, ReceiveHeader); |
| curl_easy_setopt(curl, CURLOPT_HEADERDATA, &headerData); |
| struct curl_slist* headerList = 0; |
| - for (HeaderList::const_iterator it = requestHeaders.begin(); |
| - it != requestHeaders.end(); ++it) |
| + for (auto it = requestHeaders.cbegin(); it != requestHeaders.cend(); ++it) |
| { |
| headerList = curl_slist_append(headerList, (it->first + ": " + it->second).c_str()); |
| } |
| if (headerList) |
| curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerList); |
| result.status = ConvertErrorCode(curl_easy_perform(curl)); |
| result.responseStatus = headerData.status; |
| result.responseText = responseText.str(); |
| - for (std::vector<std::string>::iterator it = headerData.headers.begin(); |
| - it != headerData.headers.end(); ++it) |
| + for (auto it = headerData.headers.cbegin(); it != headerData.headers.cend(); ++it) |
| { |
| // Parse header name and value out of something like "Foo: bar" |
| std::string header = *it; |
| size_t colonPos = header.find(':'); |
| if (colonPos != std::string::npos) |
| { |
| size_t nameStart = 0; |
| size_t nameEnd = colonPos; |