]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/oglmisc.cpp
wxPalette unified. Source cleaning.
[wxWidgets.git] / contrib / src / ogl / oglmisc.cpp
index 3f63c093177784a4362d74b22cce3b9fc0cff25a..9904941314b434652afd244fecf6447e135a43a4 100644 (file)
@@ -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"
 
@@ -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