Get rid of INIT_TOOL_BMP() macro in the toolbar sample

It isn't really useful any more now that all ports use wxBITMAP_PNG()
and just obfuscates the code.

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-09-15 18:23:42 +01:00
parent 8a337fcdd9
commit fe615bdeea

View File

@@ -377,17 +377,14 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
wxBitmap toolBarBitmaps[Tool_Max]; wxBitmap toolBarBitmaps[Tool_Max];
#define INIT_TOOL_BMP(bmp) \ toolBarBitmaps[Tool_new ] = wxBITMAP_PNG(new );
toolBarBitmaps[Tool_##bmp] = wxBITMAP_PNG(bmp) toolBarBitmaps[Tool_open ] = wxBITMAP_PNG(open );
toolBarBitmaps[Tool_save ] = wxBITMAP_PNG(save );
INIT_TOOL_BMP(new); toolBarBitmaps[Tool_copy ] = wxBITMAP_PNG(copy );
INIT_TOOL_BMP(open); toolBarBitmaps[Tool_cut ] = wxBITMAP_PNG(cut );
INIT_TOOL_BMP(save); toolBarBitmaps[Tool_paste] = wxBITMAP_PNG(paste);
INIT_TOOL_BMP(copy); toolBarBitmaps[Tool_print] = wxBITMAP_PNG(print);
INIT_TOOL_BMP(cut); toolBarBitmaps[Tool_help ] = wxBITMAP_PNG(help );
INIT_TOOL_BMP(paste);
INIT_TOOL_BMP(print);
INIT_TOOL_BMP(help);
int w = toolBarBitmaps[Tool_new].GetWidth(), int w = toolBarBitmaps[Tool_new].GetWidth(),
h = toolBarBitmaps[Tool_new].GetHeight(); h = toolBarBitmaps[Tool_new].GetHeight();