Skip to content

Commit

Permalink
PPU/LLVM: Fix unsigned/signed type comparaison warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vlj authored and Nekotekina committed Sep 1, 2015
1 parent 02a1bff commit 60d5dd4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rpcs3/Gui/SettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ SettingsDialog::SettingsDialog(wxWindow *parent)
txt_dbg_range_min->GetValue().ToLong(&minllvmid);
txt_dbg_range_max->GetValue().ToLong(&maxllvmid);
Ini.LLVMExclusionRange.SetValue(chbox_core_llvm_exclud->GetValue());
Ini.LLVMMinId.SetValue(minllvmid);
Ini.LLVMMaxId.SetValue(maxllvmid);
Ini.LLVMMinId.SetValue((u32)minllvmid);
Ini.LLVMMaxId.SetValue((u32)maxllvmid);
long llvmthreshold;
txt_llvm_threshold->GetValue().ToLong(&llvmthreshold);
Ini.LLVMThreshold.SetValue(llvmthreshold);
Ini.LLVMThreshold.SetValue((u32)llvmthreshold);
Ini.SPUDecoderMode.SetValue(rbox_spu_decoder->GetSelection());
Ini.HookStFunc.SetValue(chbox_core_hook_stfunc->GetValue());
Ini.LoadLibLv2.SetValue(chbox_core_load_liblv2->GetValue());
Expand Down
11 changes: 11 additions & 0 deletions rpcs3/Ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ void Ini::Save(const std::string& section, const std::string& key, int value)
saveIniFile();
}

void Ini::Save(const std::string& section, const std::string& key, unsigned int value)
{
static_cast<CSimpleIniCaseA*>(m_config)->SetLongValue(section.c_str(), key.c_str(), value);
saveIniFile();
}

void Ini::Save(const std::string& section, const std::string& key, bool value)
{
static_cast<CSimpleIniCaseA*>(m_config)->SetBoolValue(section.c_str(), key.c_str(), value);
Expand Down Expand Up @@ -150,6 +156,11 @@ int Ini::Load(const std::string& section, const std::string& key, const int def_
return static_cast<CSimpleIniCaseA*>(m_config)->GetLongValue(section.c_str(), key.c_str(), def_value);
}

unsigned int Ini::Load(const std::string& section, const std::string& key, const unsigned int def_value)
{
return static_cast<CSimpleIniCaseA*>(m_config)->GetLongValue(section.c_str(), key.c_str(), def_value);
}

bool Ini::Load(const std::string& section, const std::string& key, const bool def_value)
{
return StringToBool(static_cast<CSimpleIniCaseA*>(m_config)->GetValue(section.c_str(), key.c_str(), BoolToString(def_value).c_str()));
Expand Down
8 changes: 5 additions & 3 deletions rpcs3/Ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ class Ini
Ini();

void Save(const std::string& section, const std::string& key, int value);
void Save(const std::string& section, const std::string& key, unsigned int value);
void Save(const std::string& section, const std::string& key, bool value);
void Save(const std::string& section, const std::string& key, std::pair<int, int> value);
void Save(const std::string& section, const std::string& key, const std::string& value);
void Save(const std::string& section, const std::string& key, WindowInfo value);

int Load(const std::string& section, const std::string& key, const int def_value);
unsigned int Load(const std::string& section, const std::string& key, const unsigned int def_value);
bool Load(const std::string& section, const std::string& key, const bool def_value);
std::pair<int, int> Load(const std::string& section, const std::string& key, const std::pair<int, int> def_value);
std::string Load(const std::string& section, const std::string& key, const std::string& def_value);
Expand Down Expand Up @@ -93,9 +95,9 @@ class Inis
// Core
IniEntry<u8> CPUDecoderMode;
IniEntry<bool> LLVMExclusionRange;
IniEntry<int> LLVMMinId;
IniEntry<int> LLVMMaxId;
IniEntry<int> LLVMThreshold;
IniEntry<u32> LLVMMinId;
IniEntry<u32> LLVMMaxId;
IniEntry<u32> LLVMThreshold;
IniEntry<u8> SPUDecoderMode;
IniEntry<bool> HookStFunc;
IniEntry<bool> LoadLibLv2;
Expand Down

0 comments on commit 60d5dd4

Please sign in to comment.