OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 #ifndef FloatBox_h | 30 #ifndef FloatBox_h |
31 #define FloatBox_h | 31 #define FloatBox_h |
32 | 32 |
33 #include "platform/geometry/FloatPoint3D.h" | 33 #include "platform/geometry/FloatPoint3D.h" |
34 #include <algorithm> | 34 #include <algorithm> |
35 #include <cmath> | 35 #include <cmath> |
| 36 #include <iosfwd> |
36 | 37 |
37 namespace blink { | 38 namespace blink { |
38 | 39 |
39 class FloatBox { | 40 class FloatBox { |
40 public: | 41 public: |
41 FloatBox() | 42 FloatBox() |
42 : m_x(0) | 43 : m_x(0) |
43 , m_y(0) | 44 , m_y(0) |
44 , m_z(0) | 45 , m_z(0) |
45 , m_width(0) | 46 , m_width(0) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 { | 170 { |
170 return a.x() == b.x() && a.y() == b.y() && a.z() == b.z() && a.width() == b.
width() | 171 return a.x() == b.x() && a.y() == b.y() && a.z() == b.z() && a.width() == b.
width() |
171 && a.height() == b.height() && a.depth() == b.depth(); | 172 && a.height() == b.height() && a.depth() == b.depth(); |
172 } | 173 } |
173 | 174 |
174 inline bool operator!=(const FloatBox& a, const FloatBox& b) | 175 inline bool operator!=(const FloatBox& a, const FloatBox& b) |
175 { | 176 { |
176 return !(a == b); | 177 return !(a == b); |
177 } | 178 } |
178 | 179 |
| 180 // Redeclared here to avoid ODR issues. |
| 181 // See platform/testing/GeometryPrinters.h. |
| 182 void PrintTo(const FloatBox&, std::ostream*); |
| 183 |
179 } // namespace blink | 184 } // namespace blink |
180 | 185 |
181 #endif | 186 #endif |
OLD | NEW |