From 30aad30a0a609b879ea5cb938d66c53955268121 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Oct 2021 23:07:21 +0200 Subject: [PATCH] Don't create unnecessary vector in wxBitmapBundle::FromBitmap() Just use wxBitmapBundle ctor instead, this is both simpler and more efficient. No real changes. --- include/wx/bmpbndl.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/wx/bmpbndl.h b/include/wx/bmpbndl.h index 6609e649a0..e55ba08f44 100644 --- a/include/wx/bmpbndl.h +++ b/include/wx/bmpbndl.h @@ -149,12 +149,7 @@ wxBitmapBundle wxBitmapBundle::FromBitmaps(const wxBitmap& bitmap1, /* static */ inline wxBitmapBundle wxBitmapBundle::FromBitmap(const wxBitmap& bitmap) { - if ( !bitmap.IsOk() ) - return wxBitmapBundle(); - - wxVector bitmaps; - bitmaps.push_back(bitmap); - return FromBitmaps(bitmaps); + return wxBitmapBundle(bitmap); } /* static */ inline