Merge branch 'dfb-cxx17'

Fix wxDirectFB build with C++17.

See #23991.
This commit is contained in:
Vadim Zeitlin 2023-10-25 23:49:00 +02:00
commit 600049f20c
2 changed files with 6 additions and 1 deletions

View file

@ -14,9 +14,14 @@
#include "wx/gdicmn.h"
#include "wx/vidmode.h"
// "register" is removed in C++17 but used inside these headers.
#define register
#include <directfb.h>
#include <directfb_version.h>
#undef register
// DFB < 1.0 didn't have u8 type, only __u8
#if DIRECTFB_MAJOR_VERSION == 0
typedef __u8 u8;

View file

@ -248,7 +248,7 @@ DFBSurfacePixelFormat DepthToFormat(int depth)
// is typically wxUint32 for RGB32, wxUint16 for RGB16 &c) as we don't need
// access to the individual pixel components -- and so it's not suitable for
// the pixel formats with pixel size not equal to 8, 16 or 32
template <typename T, int White, int Black>
template <typename T, T White, T Black>
void
CopyBits(int width,
int height,