Embedded images should use std::array<> not C arrays
Description:
C++ code analysis can complain about using a C-style array instead of std::array<> for our embedded bitmap images. If we change that, we could also change the call to wxueImage and pass it an array by reference and eliminate the size_data parameter since the array already knows what the size is.
This will require adding #include <array> whenever the array is specified or called.
In wxWidgets 3.2, using the C++ standard library is optional, since C++11 is not required. That changes in 3.3 -- you have to have a C++11 compiler and use of the standard library is no longer optional. Since wxUiEditor already requires C++11, I don't think there should be an issue with using the standard library by including <array>.
Unfortunately, you cannot pass a std::array to a general purpose function, because the size of the array must be part of the parameter declaration. That means you still need to call the function with a pointer to the data and the size of the data. For example:
const unsigned char wiztest_png[1239] { ... };
// becomes
const std::array<unsigned char, 1239> wiztest_png = { ... };
// Header file
extern const unsigned char wiztest_png[1239];
// becomes
extern const std::array<unsigned char, 1239> wiztest_png;
// The actual call
wxueImage(wxue_img::wiztest_png, sizeof(wxue_img::wiztest_png))
// becomes
wxueImage(wxue_img::wiztest_png.data(), wxue_img::wiztest_png.size())
That means we aren't really gaining anything other then not having code analysis complain. That's a good enough reason on its own, but it is a low priority for now.
Raising the priority and marking it for the 1.3 release -- we should be generating Modern C++11 code whenever it is reasonably possible.