From e2f1e6bda954810bc1b616d184b2a1b4a4f7a45c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 20 Apr 2003 22:08:32 +0000 Subject: [PATCH] cleanup use function-style or C-style casts, not static_cast; they're identical and easier to read --- stepmania/src/NoteDataWithScoring.cpp | 2 +- stepmania/src/RageBitmapTexture.cpp | 8 ++++---- stepmania/src/RageSound.cpp | 2 +- stepmania/src/RageSoundManager.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index 694d588143..70b2e944a2 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -38,7 +38,7 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float unsigned iStartIndex = BeatToNoteRow( fStartBeat ); unsigned iEndIndex = BeatToNoteRow( fEndBeat ); - for( unsigned i=iStartIndex; i(iEndIndex), static_cast(m_TapNoteScores[0].size())); i++ ) + for( unsigned i=iStartIndex; i(&RealFormat)); + GLint RealFormat = 0; + GLExt::glGetColorTableParameterivEXT(GL_TEXTURE_2D, GL_COLOR_TABLE_FORMAT, &RealFormat); if(RealFormat != GL_RGBA8) { /* This is a case I don't expect to happen; if it does, log, @@ -444,8 +444,8 @@ retry: /* If we're paletted, and didn't get the 8-bit palette we asked for ...*/ if(img->format->BitsPerPixel == 8) { - int size = 0; - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), reinterpret_cast(&size)); + GLint size = 0; + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &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 a775329f95..73612e40ea 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 = static_cast(min(buffer_size, buf.size() - write_pos)); + int cpy = int(min(buffer_size, buf.size() - write_pos)); buf.replace(write_pos, cpy, buffer, cpy); cnt += cpy; diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index 1ac4bfcce6..0cb6f51c45 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 = static_cast(min(unsigned(delta * 44100*4), sizeof(buf))); + int bytes = int(min(unsigned(delta * 44100*4), sizeof(buf))); int now = int(RageTimer::GetTimeSinceStart() - fake.begin) * 44100;