From: Wonki Kim Date: Fri, 11 Sep 2020 03:10:39 +0000 (+0900) Subject: overload equal operator for some data structures X-Git-Tag: submit/tizen/20200913.215058~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd86545c5ff8e29fea47d0b46b5474b87c137a0f;p=platform%2Fcore%2Fuifw%2Faurum.git overload equal operator for some data structures Rect and Point2D didn't have == operator overloadded. now they have. Change-Id: I47ec30ae1c2d506ccb2ac8b7bf8867009cf340d4 --- diff --git a/libaurum/inc/Misc/Point2D.h b/libaurum/inc/Misc/Point2D.h index 9bb304f..08a61d0 100644 --- a/libaurum/inc/Misc/Point2D.h +++ b/libaurum/inc/Misc/Point2D.h @@ -33,6 +33,24 @@ public: this->y = y; } + /** + * @brief TBD + * @since_tizen 5.5 + */ + inline bool operator==(const Point2D& rhs) + { + return this->x == rhs.x && this->y == rhs.y; + } + + /** + * @brief TBD + * @since_tizen 5.5 + */ + inline bool operator!=(const Point2D& rhs) + { + return !(*this == rhs); + } + /** * @brief TBD */ @@ -42,4 +60,4 @@ public: * @brief TBD */ T y; -}; \ No newline at end of file +}; diff --git a/libaurum/inc/Misc/Rect.h b/libaurum/inc/Misc/Rect.h index 62aa39e..18e9a91 100644 --- a/libaurum/inc/Misc/Rect.h +++ b/libaurum/inc/Misc/Rect.h @@ -65,6 +65,23 @@ public: */ T height() const { return mBottomRight.y - mTopLeft.y; } + /** + * @brief TBD + * @since_tizen 5.5 + */ + inline bool operator==(const Rect& rhs) + { + return this->mTopLeft == rhs.mTopLeft && this->mBottomRight == rhs.mBottomRight; + } + + /** + * @brief TBD + * @since_tizen 5.5 + */ + inline bool operator!=(const Rect& rhs){ + return !(*this == rhs); + } + /** * @brief TBD */