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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/IntPoint.h

Issue 2267183003: Switch from PrintTo to operator<< for platform printers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 inline IntSize toIntSize(const IntPoint& a) 157 inline IntSize toIntSize(const IntPoint& a)
158 { 158 {
159 return IntSize(a.x(), a.y()); 159 return IntSize(a.x(), a.y());
160 } 160 }
161 161
162 inline int IntPoint::distanceSquaredToPoint(const IntPoint& point) const 162 inline int IntPoint::distanceSquaredToPoint(const IntPoint& point) const
163 { 163 {
164 return ((*this) - point).diagonalLengthSquared(); 164 return ((*this) - point).diagonalLengthSquared();
165 } 165 }
166 166
167 // Redeclared here to avoid ODR issues. 167 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const IntPoint&);
168 // See platform/testing/GeometryPrinters.h.
169 void PrintTo(const IntPoint&, std::ostream*);
170 168
171 } // namespace blink 169 } // namespace blink
172 170
173 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::IntPoint); 171 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::IntPoint);
174 172
175 #endif // IntPoint_h 173 #endif // IntPoint_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/FloatSize.cpp ('k') | third_party/WebKit/Source/platform/geometry/IntPoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698