overload equal operator for some data structures
authorWonki Kim <wonki_.kim@samsung.com>
Fri, 11 Sep 2020 03:10:39 +0000 (12:10 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 11 Sep 2020 05:32:29 +0000 (14:32 +0900)
Rect and Point2D didn't have == operator overloadded.
now they have.

Change-Id: I47ec30ae1c2d506ccb2ac8b7bf8867009cf340d4

libaurum/inc/Misc/Point2D.h
libaurum/inc/Misc/Rect.h

index 9bb304f..08a61d0 100644 (file)
@@ -35,6 +35,24 @@ public:
 
     /**
      * @brief TBD
+     * @since_tizen 5.5
+     */
+    inline bool operator==(const Point2D<T>& rhs)
+    {
+        return this->x == rhs.x && this->y == rhs.y;
+    }
+
+    /**
+     * @brief TBD
+     * @since_tizen 5.5
+     */
+    inline bool operator!=(const Point2D<T>& rhs)
+    {
+        return !(*this == rhs);
+    }
+
+    /**
+     * @brief TBD
      */
     T x;
 
@@ -42,4 +60,4 @@ public:
      * @brief TBD
      */
     T y;
-};
\ No newline at end of file
+};
index 62aa39e..18e9a91 100644 (file)
@@ -67,6 +67,23 @@ public:
 
     /**
      * @brief TBD
+     * @since_tizen 5.5
+     */
+    inline bool operator==(const Rect<T>& rhs)
+    {
+        return this->mTopLeft == rhs.mTopLeft && this->mBottomRight == rhs.mBottomRight;
+    }
+
+    /**
+     * @brief TBD
+     * @since_tizen 5.5
+     */
+    inline bool operator!=(const Rect<T>& rhs){
+        return !(*this == rhs);
+    }
+
+    /**
+     * @brief TBD
      */
     Point2D<T> mTopLeft;