war on -Werror, part 3: narrowing conversions
This commit is contained in:
+1
-1
@@ -639,7 +639,7 @@ RageSurface *RageDisplay::CreateSurfaceFromPixfmt( PixelFormat pixfmt,
|
|||||||
return surf;
|
return surf;
|
||||||
}
|
}
|
||||||
|
|
||||||
PixelFormat RageDisplay::FindPixelFormat( int iBPP, int iRmask, int iGmask, int iBmask, int iAmask, bool bRealtime )
|
PixelFormat RageDisplay::FindPixelFormat( int iBPP, unsigned iRmask, unsigned iGmask, unsigned iBmask, unsigned iAmask, bool bRealtime )
|
||||||
{
|
{
|
||||||
PixelFormatDesc tmp = { iBPP, { iRmask, iGmask, iBmask, iAmask } };
|
PixelFormatDesc tmp = { iBPP, { iRmask, iGmask, iBmask, iAmask } };
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -380,7 +380,7 @@ public:
|
|||||||
void ChangeCentering( int trans_x, int trans_y, int add_width, int add_height );
|
void ChangeCentering( int trans_x, int trans_y, int add_width, int add_height );
|
||||||
|
|
||||||
RageSurface *CreateSurfaceFromPixfmt( PixelFormat pixfmt, void *pixels, int width, int height, int pitch );
|
RageSurface *CreateSurfaceFromPixfmt( PixelFormat pixfmt, void *pixels, int width, int height, int pitch );
|
||||||
PixelFormat FindPixelFormat( int bpp, int Rmask, int Gmask, int Bmask, int Amask, bool realtime=false );
|
PixelFormat FindPixelFormat( int bpp, unsigned Rmask, unsigned Gmask, unsigned Bmask, unsigned Amask, bool realtime=false );
|
||||||
|
|
||||||
// Lua
|
// Lua
|
||||||
void PushSelf( lua_State *L );
|
void PushSelf( lua_State *L );
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ void MersenneTwister::Reset( int iSeed )
|
|||||||
|
|
||||||
void MersenneTwister::GenerateValues()
|
void MersenneTwister::GenerateValues()
|
||||||
{
|
{
|
||||||
static const int mask[] = { 0, 0x9908B0DF };
|
static const unsigned mask[] = { 0, 0x9908B0DF };
|
||||||
|
|
||||||
for( int i = 0; i < 227; ++i )
|
for( int i = 0; i < 227; ++i )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -402,6 +402,7 @@ void RenderTarget_X11::Create( const RenderTargetParam ¶m, int &iTextureWidt
|
|||||||
m_iWidth = param.iWidth;
|
m_iWidth = param.iWidth;
|
||||||
m_iHeight = param.iHeight;
|
m_iHeight = param.iHeight;
|
||||||
|
|
||||||
|
/* NOTE: int casts on GLX_DONT_CARE are for -Werror=narrowing */
|
||||||
int pConfigAttribs[] =
|
int pConfigAttribs[] =
|
||||||
{
|
{
|
||||||
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
|
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
|
||||||
@@ -410,10 +411,10 @@ void RenderTarget_X11::Create( const RenderTargetParam ¶m, int &iTextureWidt
|
|||||||
GLX_RED_SIZE, 8,
|
GLX_RED_SIZE, 8,
|
||||||
GLX_GREEN_SIZE, 8,
|
GLX_GREEN_SIZE, 8,
|
||||||
GLX_BLUE_SIZE, 8,
|
GLX_BLUE_SIZE, 8,
|
||||||
GLX_ALPHA_SIZE, param.bWithAlpha? 8:GLX_DONT_CARE,
|
GLX_ALPHA_SIZE, param.bWithAlpha? 8: (int) GLX_DONT_CARE,
|
||||||
|
|
||||||
GLX_DOUBLEBUFFER, False,
|
GLX_DOUBLEBUFFER, False,
|
||||||
GLX_DEPTH_SIZE, param.bWithDepthBuffer? 16:GLX_DONT_CARE,
|
GLX_DEPTH_SIZE, param.bWithDepthBuffer? 16: (int) GLX_DONT_CARE,
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
int iConfigs;
|
int iConfigs;
|
||||||
|
|||||||
Reference in New Issue
Block a user