Fix warnings about shortening 64 bits to 32 bits.
This commit is contained in:
@@ -49,12 +49,12 @@ static uint64_t GetTime( bool bAccurate )
|
||||
|
||||
float RageTimer::GetTimeSinceStart( bool bAccurate )
|
||||
{
|
||||
uint64_t usecs = GetTime( bAccurate );
|
||||
int64_t usecs = GetTime( bAccurate );
|
||||
usecs -= g_iStartTime;
|
||||
// HACK: VC6 can't cast u64 to a double, but it can cast a i64 to a double.
|
||||
// We can afford to lose one bit of precision since these numbers will
|
||||
// never overflow a 64 int.
|
||||
return (int64_t)usecs / 1000000.f;
|
||||
return float( double(usecs) / 1000000. );
|
||||
}
|
||||
|
||||
void RageTimer::Touch()
|
||||
|
||||
@@ -26,13 +26,13 @@ void RageColor::FromStack( lua_State *L, int iPos )
|
||||
int iFrom = lua_gettop( L );
|
||||
|
||||
lua_rawgeti( L, iFrom, 1 );
|
||||
r = lua_tonumber( L, -1 );
|
||||
r = (float)lua_tonumber( L, -1 );
|
||||
lua_rawgeti( L, iFrom, 2 );
|
||||
g = lua_tonumber( L, -1 );
|
||||
g = (float)lua_tonumber( L, -1 );
|
||||
lua_rawgeti( L, iFrom, 3 );
|
||||
b = lua_tonumber( L, -1 );
|
||||
b = (float)lua_tonumber( L, -1 );
|
||||
lua_rawgeti( L, iFrom, 4 );
|
||||
a = lua_tonumber( L, -1 );
|
||||
a = (float)lua_tonumber( L, -1 );
|
||||
lua_pop( L, 5 );
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ private:
|
||||
float *m_BufferNext; // beginning of the unread data
|
||||
int m_FramesInBuffer; // total number of frames at m_BufferNext
|
||||
int64_t m_iPosition; // stream frame of m_BufferNext
|
||||
sound_block() { m_FramesInBuffer = m_iPosition = 0; m_BufferNext = m_Buffer; }
|
||||
sound_block() { m_FramesInBuffer = 0; m_iPosition = 0; m_BufferNext = m_Buffer; }
|
||||
};
|
||||
|
||||
struct Sound
|
||||
|
||||
@@ -326,7 +326,7 @@ float RageSoundDriver_AU::GetPlayLatency() const
|
||||
bufferSize += frames;
|
||||
} while( false );
|
||||
|
||||
return bufferSize / sampleRate;
|
||||
return float( bufferSize / sampleRate );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user