mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fix some of the compiler warnings that have appeared recently.
This commit is contained in:
parent
46cd91dc0d
commit
12d791a628
@ -66,9 +66,8 @@ void CUCode_AX::LoadResamplingCoefficients()
|
||||
|
||||
WARN_LOG(DSPHLE, "Loading polyphase resampling coeffs from %s", filename.c_str());
|
||||
|
||||
FILE* fp = fopen(filename.c_str(), "rb");
|
||||
fread(m_coeffs, 1, 0x1000, fp);
|
||||
fclose(fp);
|
||||
File::IOFile fp(filename, "rb");
|
||||
fp.ReadBytes(m_coeffs, 0x1000);
|
||||
|
||||
for (u32 i = 0; i < 0x800; ++i)
|
||||
m_coeffs[i] = Common::swap16(m_coeffs[i]);
|
||||
|
@ -157,7 +157,7 @@ void VerifyBuffer(std::vector<u8>& buffer)
|
||||
// return state number not in map
|
||||
int GetEmptySlot(std::map<double, int> m)
|
||||
{
|
||||
for (int i = 1; i <= NUM_STATES; i++)
|
||||
for (int i = 1; i <= (int)NUM_STATES; i++)
|
||||
{
|
||||
bool found = false;
|
||||
for (std::map<double, int>::iterator it = m.begin(); it != m.end(); it++)
|
||||
@ -173,12 +173,14 @@ int GetEmptySlot(std::map<double, int> m)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static std::string MakeStateFilename(int number);
|
||||
|
||||
// read state timestamps
|
||||
std::map<double, int> GetSavedStates()
|
||||
{
|
||||
StateHeader header;
|
||||
std::map<double, int> m;
|
||||
for (int i = 1; i <= NUM_STATES; i++)
|
||||
for (int i = 1; i <= (int)NUM_STATES; i++)
|
||||
{
|
||||
if (File::Exists(MakeStateFilename(i)))
|
||||
{
|
||||
@ -570,7 +572,7 @@ void LoadLastSaved(int i)
|
||||
{
|
||||
std::map<double, int> savedStates = GetSavedStates();
|
||||
|
||||
if (i > savedStates.size())
|
||||
if (i > (int)savedStates.size())
|
||||
Core::DisplayMessage("State doesn't exist", 2000);
|
||||
else
|
||||
{
|
||||
|
@ -49,8 +49,6 @@ void SaveToBuffer(std::vector<u8>& buffer);
|
||||
void LoadFromBuffer(std::vector<u8>& buffer);
|
||||
void VerifyBuffer(std::vector<u8>& buffer);
|
||||
|
||||
static std::string MakeStateFilename(int number);
|
||||
|
||||
void LoadLastSaved(int i = 1);
|
||||
void SaveFirstSaved();
|
||||
void UndoSaveState();
|
||||
|
@ -159,14 +159,14 @@ void CFrame::CreateMenu()
|
||||
loadMenu->Append(IDM_UNDOLOADSTATE, GetMenuLabel(HK_UNDO_LOAD_STATE));
|
||||
loadMenu->AppendSeparator();
|
||||
|
||||
for (int i = 1; i <= State::NUM_STATES; i++)
|
||||
for (unsigned int i = 1; i <= State::NUM_STATES; i++)
|
||||
{
|
||||
loadMenu->Append(IDM_LOADSLOT1 + i - 1, GetMenuLabel(HK_LOAD_STATE_SLOT_1 + i - 1));
|
||||
saveMenu->Append(IDM_SAVESLOT1 + i - 1, GetMenuLabel(HK_SAVE_STATE_SLOT_1 + i - 1));
|
||||
}
|
||||
|
||||
loadMenu->AppendSeparator();
|
||||
for (int i = 1; i <= State::NUM_STATES; i++)
|
||||
for (unsigned int i = 1; i <= State::NUM_STATES; i++)
|
||||
loadMenu->Append(IDM_LOADLAST1 + i - 1, GetMenuLabel(HK_LOAD_LAST_STATE_1 + i - 1));
|
||||
|
||||
m_MenuBar->Append(emulationMenu, _("&Emulation"));
|
||||
|
Loading…
Reference in New Issue
Block a user