X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ba06d5a8ccf8c224fcfbd52fa01a55abf7befbd..3030ae493df7500fd5da7555f141c0c8a690bd8a:/contrib/src/ogl/mfutils.cpp diff --git a/contrib/src/ogl/mfutils.cpp b/contrib/src/ogl/mfutils.cpp index 6c268e8425..9a103bedde 100644 --- a/contrib/src/ogl/mfutils.cpp +++ b/contrib/src/ogl/mfutils.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "mfutils.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,11 +17,11 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif -#include -#include +#include "wx/metafile.h" +#include "wx/utils.h" #include "wx/ogl/ogl.h" @@ -111,7 +107,7 @@ wxXMetaFile::wxXMetaFile(const wxChar *file) [3] | -> wxPen The handle table works as follows. - When a GDI object is created whilst reading in the + When a GDI object is created while reading in the metafile, the (e.g.) createpen record is added to the first free entry in the handle table. The createpen record's param1 is a pointer to the actual wxPen, and @@ -560,14 +556,14 @@ bool wxXMetaFile::ReadFile(const wxChar *file) /* int lfEsc = */ getshort(handle); // 2 bytes /* int lfOrient = */ getshort(handle); // 2 bytes int lfWeight = getshort(handle); // 2 bytes - char lfItalic = getc(handle); // 1 byte - char lfUnderline = getc(handle); // 1 byte + char lfItalic = (char)getc(handle); // 1 byte + char lfUnderline = (char)getc(handle); // 1 byte /* char lfStrikeout = */ getc(handle); // 1 byte /* char lfCharSet = */ getc(handle); // 1 byte /* char lfOutPrecision = */ getc(handle); // 1 byte /* char lfClipPrecision = */ getc(handle); // 1 byte /* char lfQuality = */ getc(handle); // 1 byte - char lfPitchAndFamily = getc(handle); // 1 byte (18th) + char lfPitchAndFamily = (char)getc(handle); // 1 byte (18th) char lfFacename[32]; // Read the rest of the record, which is total record size // minus the number of bytes already read (18 record, 6 metarecord @@ -728,13 +724,13 @@ bool wxXMetaFile::ReadFile(const wxChar *file) wxXMetaFile::~wxXMetaFile(void) { - wxNode *node = metaRecords.GetFirst(); + wxObjectList::compatibility_iterator node = metaRecords.GetFirst(); while (node) { wxMetaRecord *rec = (wxMetaRecord *)node->GetData(); delete rec; - wxNode *next = node->GetNext(); - delete node; + wxObjectList::compatibility_iterator next = node->GetNext(); + metaRecords.Erase(node); node = next; } } @@ -746,7 +742,7 @@ bool wxXMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height)) bool wxXMetaFile::Play(wxDC *dc) { - wxNode *node = metaRecords.GetFirst(); + wxObjectList::compatibility_iterator node = metaRecords.GetFirst(); while (node) { wxMetaRecord *rec = (wxMetaRecord *)node->GetData();