@@ -45,17 +45,13 @@ struct RoundingRadii {
4545 top_left == bottom_right;
4646 }
4747
48- constexpr bool AreNearlyAllSame () const {
49- return top_left == top_right && //
50- top_left == bottom_left && //
51- top_left == bottom_right;
52- }
53-
54- constexpr void Scale (Scalar scale) {
55- top_left *= scale;
56- top_right *= scale;
57- bottom_left *= scale;
58- bottom_right *= scale;
48+ constexpr inline RoundingRadii operator *(Scalar scale) {
49+ return {
50+ .top_left = top_left * scale,
51+ .top_right = top_right * scale,
52+ .bottom_left = bottom_left * scale,
53+ .bottom_right = bottom_right * scale,
54+ };
5955 }
6056
6157 [[nodiscard]] constexpr bool operator ==(const RoundingRadii& rr) const {
@@ -65,8 +61,8 @@ struct RoundingRadii {
6561 bottom_right == rr.bottom_right ;
6662 }
6763
68- [[nodiscard]] constexpr bool operator !=(const RoundingRadii& r ) const {
69- return !(*this == r );
64+ [[nodiscard]] constexpr bool operator !=(const RoundingRadii& rr ) const {
65+ return !(*this == rr );
7066 }
7167};
7268
@@ -130,7 +126,7 @@ struct RoundRect {
130126 // / along the top and left edges but not points along the
131127 // / right and bottom edges so that a point is only ever
132128 // / considered inside one of two abutting rectangles.
133- [[nodiscard]] constexpr bool Contains (const Point& p) const ;
129+ [[nodiscard]] bool Contains (const Point& p) const ;
134130
135131 // / @brief Returns a new round rectangle translated by the given offset.
136132 [[nodiscard]] constexpr RoundRect Shift (Scalar dx, Scalar dy) const {
0 commit comments