Compilation fix for narrowing conversions in XBM files in wxMotif

The same fix as in commit 3704547684 for ticket #12575.
This commit is contained in:
Lauri Nurmi 2017-04-15 15:31:30 +03:00 committed by VZ
parent 2e9e3f5c31
commit 4cdc1f5ba8
8 changed files with 22 additions and 20 deletions

View File

@ -1,6 +1,6 @@
#define bdiag_width 16
#define bdiag_height 16
static char bdiag_bits[] = {
static unsigned char bdiag_bits[] = {
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04,
0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10,
0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01};

View File

@ -232,7 +232,7 @@ Pixmap
XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
{
static char stipple_data[] =
static unsigned char stipple_data[] =
{
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA,
@ -259,7 +259,9 @@ XCreateInsensitivePixmap( Display *display, Pixmap pixmap )
/* Get the stipple pixmap to be used to 'gray-out' the argument pixmap.
*/
stipple = XCreateBitmapFromData( display, pixmap, stipple_data, 16, 16 );
stipple = XCreateBitmapFromData( display, pixmap,
reinterpret_cast<const char*>(stipple_data),
16, 16 );
if ( 0 != stipple )
{
gc = XCreateGC( display, pixmap, (XtGCMask)0, NULL );

View File

@ -1,6 +1,6 @@
#define cdiag_width 16
#define cdiag_height 16
static char cdiag_bits[] = {
static unsigned char cdiag_bits[] = {
0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24,
0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18,
0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81};

View File

@ -1,6 +1,6 @@
#define cross_width 15
#define cross_height 15
static char cross_bits[] = {
static unsigned char cross_bits[] = {
0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0xff, 0x7f, 0x84, 0x10, 0x84, 0x10};

View File

@ -1653,35 +1653,35 @@ void wxWindowDCImpl::SetPen( const wxPen &pen )
if (bdiag == (Pixmap) 0)
bdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
bdiag_bits, bdiag_width, bdiag_height);
reinterpret_cast<const char*>(bdiag_bits), bdiag_width, bdiag_height);
myStipple = bdiag;
break;
case wxFDIAGONAL_HATCH:
if (fdiag == (Pixmap) 0)
fdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
fdiag_bits, fdiag_width, fdiag_height);
reinterpret_cast<const char*>(fdiag_bits), fdiag_width, fdiag_height);
myStipple = fdiag;
break;
case wxCROSS_HATCH:
if (cross == (Pixmap) 0)
cross = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
cross_bits, cross_width, cross_height);
reinterpret_cast<const char*>(cross_bits), cross_width, cross_height);
myStipple = cross;
break;
case wxHORIZONTAL_HATCH:
if (horiz == (Pixmap) 0)
horiz = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
horiz_bits, horiz_width, horiz_height);
reinterpret_cast<const char*>(horiz_bits), horiz_width, horiz_height);
myStipple = horiz;
break;
case wxVERTICAL_HATCH:
if (verti == (Pixmap) 0)
verti = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
verti_bits, verti_width, verti_height);
reinterpret_cast<const char*>(verti_bits), verti_width, verti_height);
myStipple = verti;
break;
case wxCROSSDIAG_HATCH:
@ -1689,7 +1689,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen )
if (cdiag == (Pixmap) 0)
cdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
cdiag_bits, cdiag_width, cdiag_height);
reinterpret_cast<const char*>(cdiag_bits), cdiag_width, cdiag_height);
myStipple = cdiag;
break;
}
@ -1824,35 +1824,35 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush )
if (bdiag == (Pixmap) 0)
bdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
bdiag_bits, bdiag_width, bdiag_height);
reinterpret_cast<const char*>(bdiag_bits), bdiag_width, bdiag_height);
myStipple = bdiag;
break;
case wxFDIAGONAL_HATCH:
if (fdiag == (Pixmap) 0)
fdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
fdiag_bits, fdiag_width, fdiag_height);
reinterpret_cast<const char*>(fdiag_bits), fdiag_width, fdiag_height);
myStipple = fdiag;
break;
case wxCROSS_HATCH:
if (cross == (Pixmap) 0)
cross = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
cross_bits, cross_width, cross_height);
reinterpret_cast<const char*>(cross_bits), cross_width, cross_height);
myStipple = cross;
break;
case wxHORIZONTAL_HATCH:
if (horiz == (Pixmap) 0)
horiz = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
horiz_bits, horiz_width, horiz_height);
reinterpret_cast<const char*>(horiz_bits), horiz_width, horiz_height);
myStipple = horiz;
break;
case wxVERTICAL_HATCH:
if (verti == (Pixmap) 0)
verti = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
verti_bits, verti_width, verti_height);
reinterpret_cast<const char*>(verti_bits), verti_width, verti_height);
myStipple = verti;
break;
case wxCROSSDIAG_HATCH:
@ -1860,7 +1860,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush )
if (cdiag == (Pixmap) 0)
cdiag = XCreateBitmapFromData ((Display*) m_display,
RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)),
cdiag_bits, cdiag_width, cdiag_height);
reinterpret_cast<const char*>(cdiag_bits), cdiag_width, cdiag_height);
myStipple = cdiag;
break;
}

View File

@ -1,6 +1,6 @@
#define fdiag_width 16
#define fdiag_height 16
static char fdiag_bits[] = {
static unsigned char fdiag_bits[] = {
0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20,
0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08,
0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80};

View File

@ -1,6 +1,6 @@
#define horiz_width 15
#define horiz_height 15
static char horiz_bits[] = {
static unsigned char horiz_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};

View File

@ -1,6 +1,6 @@
#define verti_width 15
#define verti_height 15
static char verti_bits[] = {
static unsigned char verti_bits[] = {
0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0x84, 0x10, 0x84, 0x10};