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

Unified Diff: views/view_text_utils.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 10 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 | « views/view.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_text_utils.cc
diff --git a/views/view_text_utils.cc b/views/view_text_utils.cc
index 0a3fc33834691a98705976b1213573b7d68554e9..d221e193c3db94c35c19f3fed619c5023e525f01 100644
--- a/views/view_text_utils.cc
+++ b/views/view_text_utils.cc
@@ -142,7 +142,7 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
canvas->DrawStringInt(word, font, text_color, x, y, w, font.GetHeight(),
flags);
- if (word.size() > 0 && word[word.size() - 1] == '\x0a') {
+ if (!word.empty() && word[word.size() - 1] == '\x0a') {
// When we come across '\n', we move to the beginning of the next line.
position->set_width(0);
position->Enlarge(0, font.GetHeight());
« no previous file with comments | « views/view.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698