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

Unified Diff: ui/gfx/point.cc

Issue 8044015: ui/gfx: Add ToString() function to Point class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/gfx/point.h ('k') | ui/gfx/rect.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/point.cc
diff --git a/ui/gfx/point.cc b/ui/gfx/point.cc
index 0dc5274e8cabe3d3a1d338811445ba8e8b8a551e..ba9ced7b9594bf83fbbdc088115600a5e8900791 100644
--- a/ui/gfx/point.cc
+++ b/ui/gfx/point.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include <windows.h>
#endif
-#include <ostream>
+#include "base/stringprintf.h"
namespace gfx {
@@ -49,8 +49,8 @@ CGPoint Point::ToCGPoint() const {
}
#endif
-std::ostream& operator<<(std::ostream& out, const gfx::Point& p) {
- return out << p.x() << "," << p.y();
+std::string Point::ToString() const {
+ return base::StringPrintf("%d,%d", x_, y_);
}
} // namespace gfx
« no previous file with comments | « ui/gfx/point.h ('k') | ui/gfx/rect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698