X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a65abcfdeb11274b08c1f8b4dc6a6e32ce0f3fe7..209f3e1453dd576919bf1cc8f696218dae23c34b:/contrib/src/ogl/oglmisc.cpp diff --git a/contrib/src/ogl/oglmisc.cpp b/contrib/src/ogl/oglmisc.cpp index 74efcd1609..bedff9915d 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -282,7 +282,7 @@ void oglCentreText(wxDC& dc, wxList *text_list, i ++; } - delete widths; + delete[] widths; } // Centre a list of strings in the given box @@ -452,7 +452,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 +871,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