X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1484b5cc701329c54bbe70f2a155119fd86945c7..bc59c2062c644236551b9652874414bdb2144955:/contrib/src/ogl/basic.cpp diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index 95f6993b8b..f5f513f798 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -276,7 +276,7 @@ wxShape::wxShape(wxShapeCanvas *can) m_pen = g_oglBlackPen; m_brush = wxWHITE_BRUSH; m_font = g_oglNormalFont; - m_textColour = wxBLACK; + m_textColour = wxT("BLACK"); m_textColourName = wxT("BLACK"); m_visible = FALSE; m_selected = FALSE; @@ -753,8 +753,7 @@ int wxShape::GetFormatMode(int regionId) const void wxShape::SetTextColour(const wxString& the_colour, int regionId) { - wxColour *wxcolour = wxTheColourDatabase->FindColour(the_colour); - m_textColour = wxcolour; + m_textColour = wxTheColourDatabase->Find(the_colour); m_textColourName = the_colour; wxNode *node = m_regions.Item(regionId); @@ -920,7 +919,7 @@ void wxShape::OnDrawContents(wxDC& dc) wxShapeRegion *region = (wxShapeRegion *)m_regions.GetFirst()->GetData(); if (region->GetFont()) dc.SetFont(* region->GetFont()); - dc.SetTextForeground(* (region->GetActualColourObject())); + dc.SetTextForeground(region->GetActualColourObject()); dc.SetBackgroundMode(wxTRANSPARENT); if (!m_formatted) { @@ -2064,7 +2063,7 @@ void wxShape::ReadRegions(wxExpr *clause) wxChar regionNameBuf[20]; wxChar textNameBuf[20]; - wxExpr *regionExpr = NULL; + wxExpr *regionExpr; wxExpr *textExpr = NULL; wxSprintf(regionNameBuf, _T("region%d"), regionNo); wxSprintf(textNameBuf, _T("text%d"), regionNo); @@ -2896,8 +2895,7 @@ wxRealPoint wxShape::CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPo // Return the zero-based position in m_lines of line. int wxShape::GetLinePosition(wxLineShape* line) { - size_t i = 0; - for (i = 0; i < m_lines.GetCount(); i++) + for (size_t i = 0; i < m_lines.GetCount(); i++) if ((wxLineShape*) (m_lines.Item(i)->GetData()) == line) return i;