| Index: ui/gfx/geometry/point.h
|
| diff --git a/ui/gfx/geometry/point.h b/ui/gfx/geometry/point.h
|
| index f1d1e3af76492b8d12e4f23eb192a1de6164002c..bb248d5432bee1f178f46bd966dde1a4aabeb705 100644
|
| --- a/ui/gfx/geometry/point.h
|
| +++ b/ui/gfx/geometry/point.h
|
| @@ -9,8 +9,8 @@
|
| #include <string>
|
| #include <tuple>
|
|
|
| +#include "base/numerics/saturated_arithmetic.h"
|
| #include "build/build_config.h"
|
| -#include "ui/gfx/geometry/safe_integer_conversions.h"
|
| #include "ui/gfx/geometry/vector2d.h"
|
| #include "ui/gfx/gfx_export.h"
|
|
|
| @@ -56,18 +56,18 @@ class GFX_EXPORT Point {
|
| }
|
|
|
| void Offset(int delta_x, int delta_y) {
|
| - x_ = SafeAdd(x_, delta_x);
|
| - y_ = SafeAdd(y_, delta_y);
|
| + x_ = base::SaturatedAddition(x_, delta_x);
|
| + y_ = base::SaturatedAddition(y_, delta_y);
|
| }
|
|
|
| void operator+=(const Vector2d& vector) {
|
| - x_ = SafeAdd(x_, vector.x());
|
| - y_ = SafeAdd(y_, vector.y());
|
| + x_ = base::SaturatedAddition(x_, vector.x());
|
| + y_ = base::SaturatedAddition(y_, vector.y());
|
| }
|
|
|
| void operator-=(const Vector2d& vector) {
|
| - x_ = SafeSubtract(x_, vector.x());
|
| - y_ = SafeSubtract(y_, vector.y());
|
| + x_ = base::SaturatedSubtraction(x_, vector.x());
|
| + y_ = base::SaturatedSubtraction(y_, vector.y());
|
| }
|
|
|
| void SetToMin(const Point& other);
|
| @@ -116,8 +116,8 @@ inline Point operator-(const Point& lhs, const Vector2d& rhs) {
|
| }
|
|
|
| inline Vector2d operator-(const Point& lhs, const Point& rhs) {
|
| - return Vector2d(SafeSubtract(lhs.x(), rhs.x()),
|
| - SafeSubtract(lhs.y(), rhs.y()));
|
| + return Vector2d(base::SaturatedSubtraction(lhs.x(), rhs.x()),
|
| + base::SaturatedSubtraction(lhs.y(), rhs.y()));
|
| }
|
|
|
| inline Point PointAtOffsetFromOrigin(const Vector2d& offset_from_origin) {
|
|
|