Applied patch [ 1161769 ] reference to temp object in carbon/palette.cpp

Potentially unsafe (and obsolete) constructor removed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-03-30 15:47:29 +00:00
parent 5ba95b7936
commit 4b524c27cc
4 changed files with 4 additions and 15 deletions

View File

@ -40,7 +40,6 @@ public:
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor

View File

@ -56,16 +56,6 @@ wxColour::wxColour (const wxColour& col)
memcpy( &m_pixel , &col.m_pixel , 6 ) ;
}
wxColour::wxColour (const wxColour* col)
{
m_red = col->m_red;
m_green = col->m_green;
m_blue = col->m_blue;
m_isInit = col->m_isInit;
memcpy( &m_pixel , &col->m_pixel , 6 ) ;
}
wxColour& wxColour::operator =(const wxColour& col)
{
m_red = col.m_red;

View File

@ -83,7 +83,7 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons
for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i )
{
const wxColour& col = &M_PALETTEDATA->m_palette[i] ;
const wxColour& col = M_PALETTEDATA->m_palette[i] ;
currentdiff = abs ( col.Red() - red ) + abs( col.Green() - green ) + abs ( col.Blue() - blue ) ;
if ( currentdiff < bestdiff )
{
@ -105,7 +105,7 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi
if (index < 0 || index >= M_PALETTEDATA->m_count)
return FALSE;
const wxColour& col = &M_PALETTEDATA->m_palette[index] ;
const wxColour& col = M_PALETTEDATA->m_palette[index] ;
*red = col.Red() ;
*green = col.Green() ;
*blue = col.Blue() ;

View File

@ -133,7 +133,7 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
if ( MacIsReallyHilited() )
{
wxPen white( wxWHITE , 1 , wxSOLID ) ;
wxPen white( *wxWHITE , 1 , wxSOLID ) ;
if (major >= 10 )
{
//Finder statusbar border color: (Project builder similar is 9B9B9B)
@ -144,7 +144,7 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
}
else
{
wxPen black( wxBLACK , 1 , wxSOLID ) ;
wxPen black( *wxBLACK , 1 , wxSOLID ) ;
dc.SetPen(black);
}
dc.DrawLine(0, 0 ,