// Name: src/generic/imaglist.cpp
// Purpose:
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
_T("invalid bitmap size in wxImageList: this might work ")
_T("on this platform but definitely won't under Windows.") );
+ const int index = int(m_images.GetCount());
+
if (bitmap.IsKindOf(CLASSINFO(wxIcon)))
{
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
m_height = bitmap.GetHeight();
}
- return m_images.GetCount()-1;
+ return index;
}
int wxGenericImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
{
wxList::compatibility_iterator node = m_images.Item( index );
- wxCHECK_MSG( node, (wxBitmap *) NULL, wxT("wrong index in image list") );
+ wxCHECK_MSG( node, NULL, wxT("wrong index in image list") );
return (wxBitmap*)node->GetData();
}