Fixed warnings about comparison between signed and unsigned integer expressions.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@366 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-27 16:12:05 +00:00
parent 541a86de26
commit e764723832
6 changed files with 10 additions and 10 deletions

View File

@ -89,7 +89,7 @@ bool ChunkFile::Do(void *ptr, int size)
//let's get into the business
bool ChunkFile::Descend(const char *cid)
{
int id = *((int*)cid);
unsigned int id = *reinterpret_cast<const unsigned int*>(cid);
if (mode == MODE_READ)
{
bool found = false;
@ -100,7 +100,7 @@ bool ChunkFile::Descend(const char *cid)
stack[stack_ptr].parentStartLocation = startPos;
stack[stack_ptr].parentEOF = eof;
int firstID = 0;
unsigned int firstID = 0;
//let's search through children..
while (ftell(f) < eof)
{

View File

@ -334,14 +334,14 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
#else
bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, std::string* _pExtension)
{
int last_slash = full_path.rfind('/');
size_t last_slash = full_path.rfind('/');
if (last_slash == std::string::npos)
{
return(false);
}
int last_dot = full_path.rfind('.');
size_t last_dot = full_path.rfind('.');
if ((last_dot == std::string::npos) || (last_dot < last_slash))
{

View File

@ -256,7 +256,7 @@ void Thread::SetAffinity(int mask)
cpu_set_t cpu_set;
CPU_ZERO(&cpu_set);
for (int i = 0; i < sizeof(mask) * 8; i++)
for (unsigned int i = 0; i < sizeof(mask) * 8; i++)
{
if ((mask >> i) & 1){CPU_SET(i, &cpu_set);}
}

View File

@ -125,15 +125,15 @@ void PatchFunctions()
void Execute(u32 _CurrentPC, u32 _Instruction)
{
int FunctionIndex = _Instruction & 0xFFFFF;
unsigned int FunctionIndex = _Instruction & 0xFFFFF;
if ((FunctionIndex > 0) && (FunctionIndex < (sizeof(OSPatches) / sizeof(SPatch))))
{
OSPatches[FunctionIndex].PatchFunction();
}
}
else
{
PanicAlert("HLE system tried to call an undefined HLE function %i.", FunctionIndex);
}
}
// _dbg_assert_msg_(HLE,NPC == LR, "Broken HLE function (doesn't set NPC)", OSPatches[pos].m_szPatchName);
}

View File

@ -67,7 +67,7 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string&
}
#else
int dot_pos = _searchString.rfind(".");
size_t dot_pos = _searchString.rfind(".");
if (dot_pos == std::string::npos)
{

View File

@ -234,7 +234,7 @@ CGameListCtrl::InsertItemInReportView(size_t _Index)
item.SetBackgroundColour(color);
DiscIO::IVolume::ECountry Country = rISOFile.GetCountry();
if (Country < m_FlagImageIndex.size())
if (size_t(Country) < m_FlagImageIndex.size())
{
item.SetImage(m_FlagImageIndex[rISOFile.GetCountry()]);
}