fixed conversion warnings
This commit is contained in:
@@ -121,7 +121,7 @@ RageBitmapTexture::RageBitmapTexture( RageTextureID name ) :
|
||||
RageBitmapTexture::~RageBitmapTexture()
|
||||
{
|
||||
if(m_uGLTextureID)
|
||||
glDeleteTextures(1, &m_uGLTextureID);
|
||||
glDeleteTextures(1,reinterpret_cast<GLuint*>(&m_uGLTextureID));
|
||||
}
|
||||
|
||||
void RageBitmapTexture::Reload()
|
||||
@@ -131,7 +131,7 @@ void RageBitmapTexture::Reload()
|
||||
|
||||
if(m_uGLTextureID)
|
||||
{
|
||||
glDeleteTextures(1, &m_uGLTextureID);
|
||||
glDeleteTextures(1, reinterpret_cast<GLuint*>(&m_uGLTextureID));
|
||||
m_uGLTextureID = 0;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void RageBitmapTexture::Create()
|
||||
SDL_Surface *img = CreateImg(desired_rgba_pixfmt);
|
||||
|
||||
if(!m_uGLTextureID)
|
||||
glGenTextures(1, &m_uGLTextureID);
|
||||
glGenTextures(1, reinterpret_cast<GLuint*>(&m_uGLTextureID));
|
||||
ASSERT(m_uGLTextureID);
|
||||
|
||||
DISPLAY->SetTexture(this);
|
||||
@@ -392,7 +392,7 @@ retry:
|
||||
GLExt::glColorTableEXT(GL_TEXTURE_2D, GL_RGBA8, 256, GL_RGBA, GL_UNSIGNED_BYTE, palette);
|
||||
|
||||
int RealFormat = 0;
|
||||
GLExt::glGetColorTableParameterivEXT(GL_TEXTURE_2D, GL_COLOR_TABLE_FORMAT, &RealFormat);
|
||||
GLExt::glGetColorTableParameterivEXT(GL_TEXTURE_2D, GL_COLOR_TABLE_FORMAT, reinterpret_cast<GLint*>(&RealFormat));
|
||||
if(RealFormat != GL_RGBA8)
|
||||
{
|
||||
/* This is a case I don't expect to happen; if it does, log,
|
||||
@@ -445,7 +445,7 @@ retry:
|
||||
if(img->format->BitsPerPixel == 8)
|
||||
{
|
||||
int size = 0;
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size);
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), reinterpret_cast<GLint*>(&size));
|
||||
if(size != 8)
|
||||
{
|
||||
/* I don't know any reason this should actually fail (paletted textures
|
||||
|
||||
@@ -735,7 +735,7 @@ void CircBuf::write(const char *buffer, unsigned buffer_size)
|
||||
unsigned write_pos = start + size();
|
||||
if(write_pos >= buf.size()) write_pos -= buf.size();
|
||||
|
||||
int cpy = min(buffer_size, buf.size() - write_pos);
|
||||
int cpy = static_cast<int>(min(buffer_size, buf.size() - write_pos));
|
||||
buf.replace(write_pos, cpy, buffer, cpy);
|
||||
|
||||
cnt += cpy;
|
||||
@@ -751,7 +751,7 @@ void CircBuf::read(char *buffer, unsigned buffer_size)
|
||||
|
||||
while(buffer_size)
|
||||
{
|
||||
unsigned total = min(buf.size() - start, size());
|
||||
unsigned total = static_cast<unsigned>(min(buf.size() - start, size()));
|
||||
unsigned cpy = min(buffer_size, total);
|
||||
buf.copy(buffer, cpy, start);
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void RageSoundManager::Update(float delta)
|
||||
RageSound *s = j->first;
|
||||
FakeSound &fake = j->second;
|
||||
|
||||
int bytes = min(unsigned(delta * 44100*4), sizeof(buf));
|
||||
int bytes = static_cast<int>(min(unsigned(delta * 44100*4), sizeof(buf)));
|
||||
|
||||
int now = int(RageTimer::GetTimeSinceStart() - fake.begin) * 44100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user