]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gdicmn.h
Reduced unnecessary painting; delete/recreate caret as WIN32 requires
[wxWidgets.git] / include / wx / gdicmn.h
index 5018eece642fb1a86409545215e9ec4b49d55368..6033cdf7cda638463f41b03913318b650ec01a2f 100644 (file)
@@ -21,6 +21,7 @@
 #include "wx/string.h"
 #include "wx/fontenc.h"
 #include "wx/hashmap.h"
+#include "wx/math.h"
 
 // ---------------------------------------------------------------------------
 // forward declarations
@@ -269,10 +270,14 @@ public:
     wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
     wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
 
-    bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; }
-    bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; }
+    bool operator==(const wxRealPoint& pt) const
+    {
+        return wxIsSameDouble(x, pt.x) && wxIsSameDouble(y, pt.y);
+    }
+    bool operator!=(const wxRealPoint& pt) const { return !(*this == pt); }
 };
 
+
 class WXDLLEXPORT wxPoint
 {
 public: