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

Unified Diff: ui/views/controls/label.cc

Issue 1138993007: Substituting pattern push_back(ptr.release()) with push_back(ptr.Pass()) in ui/events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated the review comments Created 5 years, 7 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 | « ui/events/test/test_event_target.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 57a50d78af892dfb4f2ec97fc5c6d801a912060c..766452012697dfbbc3b33dd05e44a9f772c15488 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -451,7 +451,7 @@ void Label::MaybeBuildRenderTextLines() {
render_text->SetDisplayRect(rect);
render_text->SetMultiline(multi_line());
render_text->SetWordWrapBehavior(render_text_->word_wrap_behavior());
- lines_.push_back(render_text.release());
+ lines_.push_back(render_text.Pass());
} else {
std::vector<base::string16> lines = GetLinesForWidth(rect.width());
if (lines.size() > 1)
@@ -462,7 +462,7 @@ void Label::MaybeBuildRenderTextLines() {
scoped_ptr<gfx::RenderText> line =
CreateRenderText(lines[i], alignment, directionality, elide_behavior);
line->SetDisplayRect(rect);
- lines_.push_back(line.release());
+ lines_.push_back(line.Pass());
rect.set_y(rect.y() + rect.height());
}
// Append the remaining text to the last visible line.
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698