From b713f8919c649822292f04bb7095291585d96550 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 14 Dec 2004 20:52:13 +0000 Subject: [PATCH] wx/math.h integration git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/dbbrowse/tabpgwin.cpp | 3 +- demos/fractal/fractal.cpp | 9 +- samples/console/console.cpp | 3 +- samples/opengl/isosurf/isosurf.cpp | 3 +- samples/opengl/penguin/lw.cpp | 1 - samples/treectrl/treetest.cpp | 5 +- src/common/config.cpp | 10 +- src/common/extended.c | 176 ++++++++++++++--------------- src/common/image.cpp | 32 +++--- src/common/longlong.cpp | 3 +- src/generic/dcpsg.cpp | 3 +- src/generic/listctrl.cpp | 9 +- src/generic/sashwin.cpp | 3 +- src/generic/tabg.cpp | 2 +- src/html/m_image.cpp | 4 +- src/msw/colordlg.cpp | 2 +- src/msw/dcprint.cpp | 4 +- src/msw/filedlg.cpp | 2 +- src/msw/fontdlg.cpp | 2 +- src/msw/ole/automtn.cpp | 3 +- tests/streams/datastreamtest.cpp | 3 +- 21 files changed, 138 insertions(+), 144 deletions(-) diff --git a/demos/dbbrowse/tabpgwin.cpp b/demos/dbbrowse/tabpgwin.cpp index 2e5ebff8ca..dfd222cac7 100644 --- a/demos/dbbrowse/tabpgwin.cpp +++ b/demos/dbbrowse/tabpgwin.cpp @@ -32,7 +32,8 @@ #include "wx/wx.h" #endif -#include +#include "wx/math.h" + #include #include "wx/string.h" diff --git a/demos/fractal/fractal.cpp b/demos/fractal/fractal.cpp index 217c1d13f2..51df2ed7c2 100644 --- a/demos/fractal/fractal.cpp +++ b/demos/fractal/fractal.cpp @@ -24,7 +24,7 @@ out and there is not as much snow or high mountains (maybe the random number generators fault). The viewing plane is not quite right as the original code used SetViewportOrg() which there doesn't seem to be an equivalent of under wxWidgets, and my quick -hack doesn't fix. +hack doesn't fix. */ #ifdef __GNUG__ @@ -42,8 +42,9 @@ hack doesn't fix. #include "wx/wx.h" #endif //precompiled headers +#include "wx/math.h" + #include -#include #include #define Random(x) (rand() % x) @@ -51,7 +52,7 @@ hack doesn't fix. static int detail = 9; // CHANGE THIS... 7,8,9 etc -static bool running = false; +static bool running = false; static wxMenuBar *menuBar = NULL; // Define a new application type @@ -175,7 +176,7 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) void MyCanvas::Draw(wxDC& dc) { if (running) return; - + running = true; menuBar->EnableTop(0, false); diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 0498957d32..8c748f841c 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -3260,8 +3260,7 @@ static void TestZipFileSystem() #ifdef TEST_DATETIME -#include - +#include "wx/math.h" #include "wx/datetime.h" // this test miscellaneous static wxDateTime functions diff --git a/samples/opengl/isosurf/isosurf.cpp b/samples/opengl/isosurf/isosurf.cpp index e2e936b100..95485de92d 100644 --- a/samples/opengl/isosurf/isosurf.cpp +++ b/samples/opengl/isosurf/isosurf.cpp @@ -31,6 +31,7 @@ #include "wx/timer.h" #include "wx/glcanvas.h" +#include "wx/math.h" #if defined(__WXMAC__) || defined(__WXCOCOA__) # ifdef __DARWIN__ @@ -55,8 +56,6 @@ // The following part is taken largely unchanged from the original C Version -#include - GLboolean speed_test = GL_FALSE; GLboolean use_vertex_arrays = GL_FALSE; diff --git a/samples/opengl/penguin/lw.cpp b/samples/opengl/penguin/lw.cpp index b97448a75e..9b2202000c 100644 --- a/samples/opengl/penguin/lw.cpp +++ b/samples/opengl/penguin/lw.cpp @@ -34,7 +34,6 @@ #include "lw.h" #include #include -#include #if wxUSE_GLCANVAS diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index d140808b4d..25ad3816e6 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -32,8 +32,7 @@ #include "wx/image.h" #include "wx/imaglist.h" #include "wx/treectrl.h" - -#include "math.h" +#include "wx/math.h" #ifdef __WIN32__ // this is not supported by native control @@ -411,7 +410,7 @@ void MyFrame::OnRename(wxCommandEvent& WXUNUSED(event)) static wxString s_text; s_text = wxGetTextFromUser(wxT("New name: "), wxT("Tree sample question"), s_text, this); - if ( !s_text.IsEmpty() ) + if ( !s_text.empty() ) { m_treeCtrl->SetItemText(item, s_text); } diff --git a/src/common/config.cpp b/src/common/config.cpp index f2d95677a4..3248e1e59a 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -39,9 +39,9 @@ #include "wx/textfile.h" #include "wx/utils.h" #include "wx/utils.h" +#include "wx/math.h" #include -#include #include #include // for INT_MAX @@ -234,13 +234,13 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, wxString strPath = strEntry.BeforeLast(wxCONFIG_PATH_SEPARATOR); // except in the special case of "/keyname" when there is nothing before "/" - if ( strPath.IsEmpty() && - ((!strEntry.IsEmpty()) && strEntry[0] == wxCONFIG_PATH_SEPARATOR) ) + if ( strPath.empty() && + ((!strEntry.empty()) && strEntry[0] == wxCONFIG_PATH_SEPARATOR) ) { strPath = wxCONFIG_PATH_SEPARATOR; } - if ( !strPath.IsEmpty() ) + if ( !strPath.empty() ) { if ( m_pContainer->GetPath() != strPath ) { @@ -433,7 +433,7 @@ void wxSplitPath(wxArrayString& aParts, const wxChar *sz) strCurrent.Empty(); } - else if ( !strCurrent.IsEmpty() ) { + else if ( !strCurrent.empty() ) { aParts.push_back(strCurrent); strCurrent.Empty(); } diff --git a/src/common/extended.c b/src/common/extended.c index 1e9b9c7b8e..9e2b55f9d9 100644 --- a/src/common/extended.c +++ b/src/common/extended.c @@ -17,7 +17,7 @@ #if wxUSE_APPLE_IEEE -#include +#include "wx/math.h" /* Copyright (C) 1989-1991 Ken Turkowski. * @@ -42,13 +42,13 @@ * Infinities are, however, preserved on IEEE machines. * * These routines have been tested on the following machines: - * Apple Macintosh, MPW 3.1 C compiler - * Apple Macintosh, THINK C compiler - * Silicon Graphics IRIS, MIPS compiler - * Cray X/MP and Y/MP - * Digital Equipment VAX - * Sequent Balance (Multiprocesor 386) - * NeXT + * Apple Macintosh, MPW 3.1 C compiler + * Apple Macintosh, THINK C compiler + * Silicon Graphics IRIS, MIPS compiler + * Cray X/MP and Y/MP + * Digital Equipment VAX + * Sequent Balance (Multiprocesor 386) + * NeXT * * * Implemented by Malcolm Slaney and Ken Turkowski. @@ -77,16 +77,16 @@ * Silicon Graphics MIPS-based Iris. ****************************************************************/ -#ifdef applec /* The Apple C compiler works */ -# define FloatToUnsigned(f) ((wxUint32)(f)) -# define UnsignedToFloat(u) ((wxFloat64)(u)) +#ifdef applec /* The Apple C compiler works */ +# define FloatToUnsigned(f) ((wxUint32)(f)) +# define UnsignedToFloat(u) ((wxFloat64)(u)) #else /*applec*/ -# define FloatToUnsigned(f) ((wxUint32)(((wxInt32)((f) - 2147483648.0)) + 2147483647L) + 1) -# define UnsignedToFloat(u) (((wxFloat64)((wxInt32)((u) - 2147483647L - 1))) + 2147483648.0) +# define FloatToUnsigned(f) ((wxUint32)(((wxInt32)((f) - 2147483648.0)) + 2147483647L) + 1) +# define UnsignedToFloat(u) (((wxFloat64)((wxInt32)((u) - 2147483647L - 1))) + 2147483648.0) #endif /*applec*/ - + /**************************************************************** * Extended precision IEEE floating-point conversion routines. * Extended is an 80-bit number as defined by Motorola, @@ -96,38 +96,38 @@ wxFloat64 ConvertFromIeeeExtended(wxInt8* bytes) { - wxFloat64 f; - wxInt32 expon; - wxUint32 hiMant, loMant; - - expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF); - hiMant = ((wxUint32)(bytes[2] & 0xFF) << 24) - | ((wxUint32)(bytes[3] & 0xFF) << 16) - | ((wxUint32)(bytes[4] & 0xFF) << 8) - | ((wxUint32)(bytes[5] & 0xFF)); - loMant = ((wxUint32)(bytes[6] & 0xFF) << 24) - | ((wxUint32)(bytes[7] & 0xFF) << 16) - | ((wxUint32)(bytes[8] & 0xFF) << 8) - | ((wxUint32)(bytes[9] & 0xFF)); - - if (expon == 0 && hiMant == 0 && loMant == 0) { - f = 0; - } - else { - if (expon == 0x7FFF) { /* Infinity or NaN */ - f = HUGE_VAL; - } - else { - expon -= 16383; - f = ldexp(UnsignedToFloat(hiMant), expon-=31); - f += ldexp(UnsignedToFloat(loMant), expon-=32); - } - } - - if (bytes[0] & 0x80) - return -f; - else - return f; + wxFloat64 f; + wxInt32 expon; + wxUint32 hiMant, loMant; + + expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF); + hiMant = ((wxUint32)(bytes[2] & 0xFF) << 24) + | ((wxUint32)(bytes[3] & 0xFF) << 16) + | ((wxUint32)(bytes[4] & 0xFF) << 8) + | ((wxUint32)(bytes[5] & 0xFF)); + loMant = ((wxUint32)(bytes[6] & 0xFF) << 24) + | ((wxUint32)(bytes[7] & 0xFF) << 16) + | ((wxUint32)(bytes[8] & 0xFF) << 8) + | ((wxUint32)(bytes[9] & 0xFF)); + + if (expon == 0 && hiMant == 0 && loMant == 0) { + f = 0; + } + else { + if (expon == 0x7FFF) { /* Infinity or NaN */ + f = HUGE_VAL; + } + else { + expon -= 16383; + f = ldexp(UnsignedToFloat(hiMant), expon-=31); + f += ldexp(UnsignedToFloat(loMant), expon-=32); + } + } + + if (bytes[0] & 0x80) + return -f; + else + return f; } @@ -136,48 +136,48 @@ wxFloat64 ConvertFromIeeeExtended(wxInt8* bytes) void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes) { - wxInt32 sign; - wxInt32 expon; - wxFloat64 fMant, fsMant; - wxUint32 hiMant, loMant; - - if (num < 0) { - sign = 0x8000; - num *= -1; - } else { - sign = 0; - } - - if (num == 0) { - expon = 0; hiMant = 0; loMant = 0; - } - else { - fMant = frexp(num, &expon); - if ((expon > 16384) || !(fMant < 1)) { /* Infinity or NaN */ - expon = sign|0x7FFF; hiMant = 0; loMant = 0; /* infinity */ - } - else { /* Finite */ - expon += 16382; - if (expon < 0) { /* denormalized */ - fMant = ldexp(fMant, expon); - expon = 0; - } - expon |= sign; - fMant = ldexp(fMant, 32); fsMant = floor(fMant); hiMant = FloatToUnsigned(fsMant); - fMant = ldexp(fMant - fsMant, 32); fsMant = floor(fMant); loMant = FloatToUnsigned(fsMant); - } - } - - bytes[0] = expon >> 8; - bytes[1] = expon; - bytes[2] = hiMant >> 24; - bytes[3] = hiMant >> 16; - bytes[4] = hiMant >> 8; - bytes[5] = hiMant; - bytes[6] = loMant >> 24; - bytes[7] = loMant >> 16; - bytes[8] = loMant >> 8; - bytes[9] = loMant; + wxInt32 sign; + wxInt32 expon; + wxFloat64 fMant, fsMant; + wxUint32 hiMant, loMant; + + if (num < 0) { + sign = 0x8000; + num *= -1; + } else { + sign = 0; + } + + if (num == 0) { + expon = 0; hiMant = 0; loMant = 0; + } + else { + fMant = frexp(num, &expon); + if ((expon > 16384) || !(fMant < 1)) { /* Infinity or NaN */ + expon = sign|0x7FFF; hiMant = 0; loMant = 0; /* infinity */ + } + else { /* Finite */ + expon += 16382; + if (expon < 0) { /* denormalized */ + fMant = ldexp(fMant, expon); + expon = 0; + } + expon |= sign; + fMant = ldexp(fMant, 32); fsMant = floor(fMant); hiMant = FloatToUnsigned(fsMant); + fMant = ldexp(fMant - fsMant, 32); fsMant = floor(fMant); loMant = FloatToUnsigned(fsMant); + } + } + + bytes[0] = expon >> 8; + bytes[1] = expon; + bytes[2] = hiMant >> 24; + bytes[3] = hiMant >> 16; + bytes[4] = hiMant >> 8; + bytes[5] = hiMant; + bytes[6] = loMant >> 24; + bytes[7] = loMant >> 16; + bytes[8] = loMant >> 8; + bytes[9] = loMant; } diff --git a/src/common/image.cpp b/src/common/image.cpp index ba3653b18f..0a12ff7847 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -33,10 +33,10 @@ #include "wx/module.h" #include "wx/hash.h" #include "wx/utils.h" +#include "wx/math.h" // For memcpy #include -#include #ifdef __SALFORDC__ #undef FAR @@ -831,13 +831,13 @@ unsigned char wxImage::GetAlpha(int x, int y) const bool wxImage::ConvertColourToAlpha( unsigned char r, unsigned char g, unsigned char b ) { SetAlpha( NULL ); - + int w = M_IMGDATA->m_width, h = M_IMGDATA->m_height; - + unsigned char *alpha = GetAlpha(); unsigned char *data = GetData(); - + int x,y; for (y = 0; y < h; y++) for (x = 0; x < w; x++) @@ -1719,7 +1719,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i { int i; angle = -angle; // screen coordinates are a mirror image of "real" coordinates - + bool has_alpha = HasAlpha(); // Create pointer-based array to accelerate access to wxImage's data @@ -1728,7 +1728,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i for (i = 1; i < GetHeight(); i++) data[i] = data[i - 1] + (3 * GetWidth()); - // Same for alpha channel + // Same for alpha channel unsigned char ** alpha = NULL; if (has_alpha) { @@ -1775,7 +1775,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i // array here (and in fact it would be slower). // unsigned char * dst = rotated.GetData(); - + unsigned char * alpha_dst = NULL; if (has_alpha) alpha_dst = rotated.GetAlpha(); @@ -1866,7 +1866,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = *(p++); *(dst++) = *(p++); *(dst++) = *p; - + if (has_alpha) { unsigned char *p = alpha[y1] + x1; @@ -1879,7 +1879,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = *(p++); *(dst++) = *(p++); *(dst++) = *p; - + if (has_alpha) { unsigned char *p = alpha[y1] + x2; @@ -1892,7 +1892,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = *(p++); *(dst++) = *(p++); *(dst++) = *p; - + if (has_alpha) { unsigned char *p = alpha[y2] + x2; @@ -1905,7 +1905,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = *(p++); *(dst++) = *(p++); *(dst++) = *p; - + if (has_alpha) { unsigned char *p = alpha[y2] + x1; @@ -1936,7 +1936,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i ( (w1 * *v1 + w2 * *v2 + w3 * *v3 + w4 * *v4) / (w1 + w2 + w3 + w4) ); - + if (has_alpha) { unsigned char *v1 = alpha[y1] + (x1); @@ -1956,7 +1956,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = blank_r; *(dst++) = blank_g; *(dst++) = blank_b; - + if (has_alpha) *(alpha_dst++) = 0; } @@ -1981,7 +1981,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = *(p++); *(dst++) = *(p++); *(dst++) = *p; - + if (has_alpha) { unsigned char *p = alpha[ys] + (xs); @@ -1993,7 +1993,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i *(dst++) = blank_r; *(dst++) = blank_g; *(dst++) = blank_b; - + if (has_alpha) *(alpha_dst++) = 255; } @@ -2002,7 +2002,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i } delete [] data; - + if (has_alpha) delete [] alpha; diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index f0dad06d38..6babb4eef7 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -27,6 +27,7 @@ #if wxUSE_LONGLONG #include "wx/longlong.h" +#include "wx/math.h" // for fabs() #if defined(__MWERKS__) && defined(__WXMSW__) #include // for memset() @@ -34,8 +35,6 @@ #include // for memset() #endif -#include // for fabs() - // ============================================================================ // implementation // ============================================================================ diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 3c832eda5c..aebcadbdb8 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -39,8 +39,7 @@ #include "wx/generic/prntdlgg.h" #include "wx/paper.h" #include "wx/filefn.h" - -#include +#include "wx/math.h" #ifdef __WXMSW__ diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 164f094cf0..40acbcc1a7 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -69,14 +69,13 @@ #endif // HAVE_NATIVE_LISTCTRL/!HAVE_NATIVE_LISTCTRL #include "wx/selstore.h" - #include "wx/renderer.h" +#include "wx/math.h" #ifdef __WXMAC__ #include "wx/mac/private.h" #endif -#include // NOTE: If using the wxListBox visual attributes works everywhere then this can @@ -519,7 +518,7 @@ public: const wxString &name = _T("listctrlmainwindow") ); virtual ~wxListMainWindow(); - + wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); } bool HasFlag(int flag) const { return m_parent->HasFlag(flag); } @@ -4332,7 +4331,7 @@ void wxListMainWindow::InsertItem( wxListItem &item ) if (item.m_itemId > count) item.m_itemId = count; - + size_t id = item.m_itemId; m_dirty = true; @@ -4640,7 +4639,7 @@ bool wxGenericListCtrl::Create(wxWindow *parent, m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0,0), size, style ); -#ifdef __WXMAC_CARBON__ +#ifdef __WXMAC_CARBON__ // Human Interface Guidelines ask us for a special font in this case if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL ) { diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index e6469b11ee..b2cd42c759 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -30,7 +30,8 @@ #include "wx/settings.h" #endif -#include +#include "wx/math.h" + #include #include "wx/dcscreen.h" diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index 5f66159f7e..75a10c14d5 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -31,8 +31,8 @@ #include #include #include -#include +#include "wx/math.h" #include "wx/tab.h" #include "wx/listimpl.cpp" diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index a850abcf37..fd4ff24855 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -36,8 +36,8 @@ #include "wx/dynarray.h" #include "wx/log.h" #include "wx/artprov.h" +#include "wx/math.h" -#include #include FORCE_LINK_ME(m_image) @@ -572,7 +572,7 @@ void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const { - if (m_mapName.IsEmpty()) + if (m_mapName.empty()) return wxHtmlCell::GetLink( x, y ); if (!m_imageMap) { diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index 24ad03ce51..cc836963a9 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -47,12 +47,12 @@ #include "wx/msw/private.h" #include "wx/colordlg.h" #include "wx/cmndata.h" +#include "wx/math.h" #if !defined(__WIN32__) || defined(__WXWINCE__) #include #endif -#include #include #include diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 91e48e9c5e..8636a4447c 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -46,7 +46,7 @@ #include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/msw/printdlg.h" -#include "math.h" +#include "wx/math.h" #if wxUSE_COMMON_DIALOGS #include @@ -182,7 +182,7 @@ bool wxPrinterDC::StartDoc(const wxString& message) wxString filename(m_printData.GetFilename()); - if (filename.IsEmpty()) + if (filename.empty()) docinfo.lpszOutput = NULL; else docinfo.lpszOutput = (const wxChar *) filename; diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index a474faac76..9e5f80ea48 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -46,12 +46,12 @@ #include #endif -#include #include #include #include "wx/filename.h" #include "wx/tokenzr.h" +#include "wx/math.h" #include "wx/msw/missing.h" diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index 5564303799..fefc22adb6 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -45,8 +45,8 @@ #include "wx/cmndata.h" #include "wx/log.h" +#include "wx/math.h" -#include #include #include diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 2fa498ccc6..1224bc0627 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -31,8 +31,7 @@ #include "wx/msw/private.h" #include "wx/msw/ole/oleutils.h" #include "wx/msw/ole/automtn.h" - -#include +#include "wx/math.h" #ifdef __WXWINCE__ #include "wx/msw/wince/time.h" diff --git a/tests/streams/datastreamtest.cpp b/tests/streams/datastreamtest.cpp index 2085c9d7de..3777869352 100644 --- a/tests/streams/datastreamtest.cpp +++ b/tests/streams/datastreamtest.cpp @@ -23,8 +23,7 @@ #include "wx/datstrm.h" #include "wx/wfstream.h" - -#include //HUGE +#include "wx/math.h" // ---------------------------------------------------------------------------- // test class -- 2.45.2