From a63c04785524015592a019ea6caaa3c5f1d16611 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Sat, 4 Dec 2021 14:17:20 -0800 Subject: [PATCH] Remove unused and confusing API in TRect. --- impeller/geometry/size.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/impeller/geometry/size.h b/impeller/geometry/size.h index f56e682cdc7b6..2415d314a5560 100644 --- a/impeller/geometry/size.h +++ b/impeller/geometry/size.h @@ -59,21 +59,17 @@ struct TSize { return {width - s.width, height - s.height}; } - constexpr TSize Min(const TSize& s) const { return Intersection(s); } - - constexpr TSize Max(const TSize& s) const { return Union(s); } - - constexpr TSize Union(const TSize& o) const { + constexpr TSize Min(const TSize& o) const { return { - std::max(width, o.width), - std::max(height, o.height), + std::min(width, o.width), + std::min(height, o.height), }; } - constexpr TSize Intersection(const TSize& o) const { + constexpr TSize Max(const TSize& o) const { return { - std::min(width, o.width), - std::min(height, o.height), + std::max(width, o.width), + std::max(height, o.height), }; }