Misc warning fixes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3583 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
magumagu9 2009-06-28 20:53:26 +00:00
parent 1bcef5be76
commit 7f27cfc9d2
8 changed files with 13 additions and 23 deletions

View File

@ -165,7 +165,7 @@ inline void MatrixMul(int n, const float *a, const float *b, float *result)
float MathFloatVectorSum(std::vector<float> Vec)
{
float Sum = 0.0;
for(int i = 0; i < Vec.size(); i++)
for(unsigned i = 0; i < Vec.size(); i++)
{
Sum += Vec.at(i);
}

View File

@ -51,7 +51,6 @@
static u8 s_boot_sector [ BYTES_PER_SECTOR ]; /* boot sector */
static u8 s_fsinfo_sector [ BYTES_PER_SECTOR ]; /* FS Info sector */
static u8 s_fat_head [ BYTES_PER_SECTOR ]; /* first FAT sector */
static u8 s_zero_sector [ BYTES_PER_SECTOR ]; /* empty sector */
/* this is the date and time when creating the disk */
static int get_serial_id()

View File

@ -466,7 +466,7 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
std::string out;
int len = 0;
// First, compute the size of the new string.
for (int i = 0; i < in.size(); i++)
for (unsigned i = 0; i < in.size(); i++)
{
if (in[i] == '\t')
len += tab_size;
@ -475,7 +475,7 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
}
out.resize(len);
int out_ctr = 0;
for (int i = 0; i < in.size(); i++)
for (unsigned i = 0; i < in.size(); i++)
{
if (in[i] == '\t')
{
@ -488,4 +488,4 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
}
}
return out;
}
}

View File

@ -23,8 +23,6 @@
namespace Gen
{
static bool enableBranchHints = false;
// TODO(ector): Add EAX special casing, for ever so slightly smaller code.
struct NormalOpDef
{

View File

@ -141,7 +141,6 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game
// Load a GC or Wii BIOS file
bool CBoot::Load_BIOS(const std::string& _rBiosFilename)
{
bool bResult = false;
std::string data;
if (!File::ReadFileToString(false, _rBiosFilename.c_str(), data))
return false;

View File

@ -162,10 +162,10 @@ bool CBoot::SetupWiiMemory(unsigned int _CountryCode)
INFO_LOG(BOOT, "Setup Wii Memory...");
// Write the 256 byte setting.txt to memory. This may not be needed as
// most or all games read the setting.txt file from \title\00000001\00000002\
// data\setting.txt directly after the read the SYSCONF file. The games also
// read it to 0x3800, what is a little strange however is that it only reads
// the first 100 bytes of it.
// most or all games read the setting.txt file from
// \title\00000001\00000002\data\setting.txt directly after the read the
// SYSCONF file. The games also read it to 0x3800, what is a little strange
// however is that it only reads the first 100 bytes of it.
std::string filename(File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_EUR_SETTING);
switch((DiscIO::IVolume::ECountry)_CountryCode)
{

View File

@ -679,8 +679,6 @@ void Callback_VideoCopiedToXFB()
//count FPS
static Common::Timer Timer;
static u32 frames = 0;
static u64 ticks = 0;
static u64 idleTicks = 0;
u32 targetfps = (SConfig::GetInstance().m_Framelimit)*5;
@ -782,7 +780,6 @@ void Callback_VideoCopiedToXFB()
float TargetFPS = FPS_To_VPS_Rate * (float)VideoInterface::TargetRefreshRate;
float FPSPercentage = (FPS / TargetFPS) * 100.0f;
float VPSPercentage = (VideoInterface::ActualRefreshRate / (float)VideoInterface::TargetRefreshRate) * 100.0f;
// Settings are shown the same for both extended and summary info
std::string SSettings = StringFromFormat(" | Core: %s %s",
@ -804,6 +801,7 @@ void Callback_VideoCopiedToXFB()
std::string IdleSkipMessage = "";
if (_CoreParameter.bSkipIdle || _CoreParameter.bUseDualCore) IdleSkipMessage = "~";
#ifdef EXTENDED_INFO
float VPSPercentage = (VideoInterface::ActualRefreshRate / (float)VideoInterface::TargetRefreshRate) * 100.0f;
std::string SFPS = StringFromFormat("FPS: %4.1f/%s%2.0f (%s%3.0f%% | %s%1.2f) VPS:%4.0f/%i (%3.0f%%)",
FPS, IdleSkipMessage.c_str(), TargetFPS,
IdleSkipMessage.c_str(), FPSPercentage, IdleSkipMessage.c_str(), FPS_To_VPS_Rate,

View File

@ -7,14 +7,10 @@
EventHandler *EventHandler::m_Instance = 0;
EventHandler::EventHandler() {
for (int i=0; i<NUMKEYS; i++)
for (int j=0; j<NUMMODS; j++)
keys[i][j] = NULL;
// memset(keys, sizeof(listenFuncPtr) * NUMKEYS*NUMMODS, 0);
memset(mouse, sizeof(listenFuncPtr) * (sf::Mouse::Count+1), 0);
memset(joys, sizeof(listenFuncPtr) * (sf::Joy::Count+1), 0);
}
memset(keys, 0, sizeof(keys));
memset(mouse, 0, sizeof(mouse));
memset(joys, 0, sizeof(joys));
}
EventHandler::~EventHandler() {
}