diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 8585afaa4f..bdf0249589 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -121,7 +121,7 @@ RageBitmapTexture::RageBitmapTexture( RageTextureID name ) : RageBitmapTexture::~RageBitmapTexture() { if(m_uGLTextureID) - glDeleteTextures(1, &m_uGLTextureID); + glDeleteTextures(1,reinterpret_cast(&m_uGLTextureID)); } void RageBitmapTexture::Reload() @@ -131,7 +131,7 @@ void RageBitmapTexture::Reload() if(m_uGLTextureID) { - glDeleteTextures(1, &m_uGLTextureID); + glDeleteTextures(1, reinterpret_cast(&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(&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(&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(&size)); if(size != 8) { /* I don't know any reason this should actually fail (paletted textures diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 3f297a61c5..a775329f95 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -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(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(min(buf.size() - start, size())); unsigned cpy = min(buffer_size, total); buf.copy(buffer, cpy, start); diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index 7280b8956b..1ac4bfcce6 100644 --- a/stepmania/src/RageSoundManager.cpp +++ b/stepmania/src/RageSoundManager.cpp @@ -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(min(unsigned(delta * 44100*4), sizeof(buf))); int now = int(RageTimer::GetTimeSinceStart() - fake.begin) * 44100;