Don't create unnecessary vector in wxBitmapBundle::FromBitmap()

Just use wxBitmapBundle ctor instead, this is both simpler and more
efficient.

No real changes.
This commit is contained in:
Vadim Zeitlin 2021-10-24 23:07:21 +02:00
parent 8f74ac7def
commit 30aad30a0a

View File

@ -149,12 +149,7 @@ wxBitmapBundle wxBitmapBundle::FromBitmaps(const wxBitmap& bitmap1,
/* static */ inline
wxBitmapBundle wxBitmapBundle::FromBitmap(const wxBitmap& bitmap)
{
if ( !bitmap.IsOk() )
return wxBitmapBundle();
wxVector<wxBitmap> bitmaps;
bitmaps.push_back(bitmap);
return FromBitmaps(bitmaps);
return wxBitmapBundle(bitmap);
}
/* static */ inline