X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a65abcfdeb11274b08c1f8b4dc6a6e32ce0f3fe7..3030ae493df7500fd5da7555f141c0c8a690bd8a:/contrib/src/ogl/oglmisc.cpp diff --git a/contrib/src/ogl/oglmisc.cpp b/contrib/src/ogl/oglmisc.cpp index 74efcd1609..74ee28613f 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "misc.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,14 +17,14 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if wxUSE_PROLOGIO -#include +#include "wx/deprecated/wxexpr.h" #endif -#include +#include "wx/types.h" #ifdef new #undef new @@ -282,7 +278,7 @@ void oglCentreText(wxDC& dc, wxList *text_list, i ++; } - delete widths; + delete[] widths; } // Centre a list of strings in the given box @@ -452,7 +448,7 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double wxString oldBuffer(buffer); wxString s = node->GetData(); - if (s.IsEmpty()) + if (s.empty()) { // FORCE NEW LINE if (buffer.Length() > 0) @@ -871,10 +867,12 @@ wxColour oglHexToColour(const wxString& hex) hex.Mid(0,2).ToLong(&r, 16); hex.Mid(2,2).ToLong(&g, 16); hex.Mid(4,2).ToLong(&b, 16); - return wxColour(r, g, b); + return wxColour((unsigned char)r, + (unsigned char)g, + (unsigned char)b); } else - return wxColour(0,0,0); + return *wxBLACK; } // RGB to 3-digit hex