Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: url/url_canon_stdstring.cc

Issue 2641823004: [url] Reserve size in a smarter way to account for pre-allocated buffers (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « url/url_canon_stdstring.h ('k') | url/url_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_canon_stdstring.cc
diff --git a/url/url_canon_stdstring.cc b/url/url_canon_stdstring.cc
index 366a2e070fc24672b2736bbcc6ec2213723d33e1..c81a0a98b54ec3c851f2b5f1c6ceb1f5fc7863bc 100644
--- a/url/url_canon_stdstring.cc
+++ b/url/url_canon_stdstring.cc
@@ -9,7 +9,6 @@ namespace url {
StdStringCanonOutput::StdStringCanonOutput(std::string* str)
: CanonOutput(), str_(str) {
cur_len_ = static_cast<int>(str_->size()); // Append to existing data.
- str_->resize(str_->capacity());
buffer_ = str_->empty() ? NULL : &(*str_)[0];
buffer_len_ = static_cast<int>(str_->size());
}
« no previous file with comments | « url/url_canon_stdstring.h ('k') | url/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698