Fix compile warnings
This commit is contained in:
@@ -50,7 +50,7 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||
"NextAnnouncer"
|
||||
};
|
||||
|
||||
const int MAX_CODE_LENGTH = 10;
|
||||
const unsigned MAX_CODE_LENGTH = 10;
|
||||
|
||||
struct CodeCacheItem {
|
||||
int iNumButtons;
|
||||
|
||||
@@ -515,7 +515,7 @@ void Course::GetCourseInfo( NotesType nt, vector<Course::Info> &ci, int Difficul
|
||||
for( unsigned j=0; j<AllSongsShuffled.size(); j++ )
|
||||
{
|
||||
/* See if the first song matches what we want. */
|
||||
ASSERT( CurSong < AllSongsShuffled.size() );
|
||||
ASSERT( unsigned(CurSong) < AllSongsShuffled.size() );
|
||||
pSong = AllSongsShuffled[CurSong];
|
||||
ASSERT( pSong );
|
||||
CurSong = (CurSong+1) % AllSongsShuffled.size();
|
||||
|
||||
@@ -259,7 +259,7 @@ static char backlog[BACKLOG_LINES][1024];
|
||||
static int backlog_start=0, backlog_cnt=0;
|
||||
void RageLog::AddToRecentLogs( CString str )
|
||||
{
|
||||
int len = str.size();
|
||||
unsigned len = str.size();
|
||||
if(len > sizeof(backlog[backlog_start])-1)
|
||||
len = sizeof(backlog[backlog_start])-1;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const int channels = 2;
|
||||
const int samplesize = 2 * channels; /* 16-bit */
|
||||
|
||||
/* If a sound is smaller than this, we'll load it entirely into memory. */
|
||||
const int max_prebuf_size = 1024*256;
|
||||
const unsigned max_prebuf_size = 1024*256;
|
||||
|
||||
int SoundReader_Preload::total_samples() const
|
||||
{
|
||||
@@ -24,7 +24,7 @@ bool SoundReader_Preload::Open(SoundReader *source)
|
||||
{
|
||||
float secs = len / 1000.f;
|
||||
|
||||
int pcmsize = int(secs * samplerate * samplesize); /* seconds -> bytes */
|
||||
unsigned pcmsize = unsigned(secs * samplerate * samplesize); /* seconds -> bytes */
|
||||
if(pcmsize > max_prebuf_size)
|
||||
return false; /* Don't bother trying to preload it. */
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ ScreenCredits::ScreenCredits() : Screen("ScreenCredits")
|
||||
this->AddChild( &m_ScrollerFrames );
|
||||
|
||||
|
||||
for( i=0; i<NUM_CREDIT_LINES; i++ )
|
||||
for( i=0; i<int(NUM_CREDIT_LINES); i++ )
|
||||
{
|
||||
BitmapText* pText = new BitmapText;
|
||||
pText->LoadFromFont( THEME->GetPathToF("ScreenCredits titles") );
|
||||
|
||||
Reference in New Issue
Block a user