Commit 8f2bd296 authored by krasin's avatar krasin Committed by Commit bot

net/url_util: fix std::string::assign invocation: pass string instead of char*.

According to the C++ standard, the three arguments overload
of std::string::assign accepts an std::basic_string:
http://en.cppreference.com/w/cpp/string/basic_string/assign

Fixing the usage, where char* instead of std::string was passed.

This popped up after libc++ became more standard compliant,
and now it throws a compiler error.

BUG=630681

Review-Url: https://codereview.chromium.org/2177863003
Cr-Commit-Position: refs/heads/master@{#407599}
parent 6c4a773f
...@@ -74,8 +74,7 @@ GURL AppendOrReplaceQueryParameter(const GURL& url, ...@@ -74,8 +74,7 @@ GURL AppendOrReplaceQueryParameter(const GURL& url,
replaced = true; replaced = true;
key_value_pair = (param_name + "=" + param_value); key_value_pair = (param_name + "=" + param_value);
} else { } else {
key_value_pair.assign(input.data(), key_value_pair.assign(input, key_range.begin,
key_range.begin,
value_range.end() - key_range.begin); value_range.end() - key_range.begin);
} }
if (!output.empty()) if (!output.empty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment