added wxIsSameDouble() which wraps double comparison in a pragmas disabling icc warning about it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-25 18:14:53 +00:00
parent 6cf2fb76fe
commit bc14c8b21f
3 changed files with 35 additions and 8 deletions

View 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: