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

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

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | 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 39dd95464ebf31523a8b0b83047f9681da2dde22..1db16892a84507b2a4b0482174957701906f480d 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <cmath>
#include <limits>
+#include <utility>
#include <vector>
#include "base/i18n/rtl.h"
@@ -340,7 +341,7 @@ scoped_ptr<gfx::RenderText> Label::CreateRenderText(
render_text->set_shadows(shadows());
render_text->SetCursorEnabled(false);
render_text->SetText(text);
- return render_text.Pass();
+ return render_text;
}
void Label::PaintText(gfx::Canvas* canvas) {
@@ -451,7 +452,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.Pass());
+ lines_.push_back(std::move(render_text));
} else {
std::vector<base::string16> lines = GetLinesForWidth(rect.width());
if (lines.size() > 1)
@@ -462,7 +463,7 @@ void Label::MaybeBuildRenderTextLines() {
scoped_ptr<gfx::RenderText> line =
CreateRenderText(lines[i], alignment, directionality, elide_behavior);
line->SetDisplayRect(rect);
- lines_.push_back(line.Pass());
+ lines_.push_back(std::move(line));
rect.set_y(rect.y() + rect.height());
}
// Append the remaining text to the last visible line.
« no previous file with comments | « ui/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698