fix some warnings

This commit is contained in:
Megamouse 2020-09-04 13:22:21 +02:00
parent c39ad1ee12
commit fee96ec92d
5 changed files with 9 additions and 6 deletions

View file

@ -3,9 +3,10 @@
#include "Emu/Memory/vm_ptr.h"
// Return Codes
constexpr auto CELL_RUDP_SUCCESS = CELL_OK;
enum CellRudpError : u32
{
CELL_RUDP_SUCCESS = 0,
CELL_RUDP_ERROR_NOT_INITIALIZED = 0x80770001,
CELL_RUDP_ERROR_ALREADY_INITIALIZED = 0x80770002,
CELL_RUDP_ERROR_INVALID_CONTEXT_ID = 0x80770003,

View file

@ -3,9 +3,10 @@
LOG_CHANNEL(cellSysmodule);
constexpr auto CELL_SYSMODULE_LOADED = CELL_OK;
enum CellSysmoduleError : u32
{
CELL_SYSMODULE_LOADED = CELL_OK,
CELL_SYSMODULE_ERROR_DUPLICATED = 0x80012001,
CELL_SYSMODULE_ERROR_UNKNOWN = 0x80012002,
CELL_SYSMODULE_ERROR_UNLOADED = 0x80012003,

View file

@ -821,7 +821,7 @@ error_code sys_spu_thread_group_suspend(ppu_thread& ppu, u32 id)
return false;
}
error = CellError{CELL_CANCEL};
error = CellError{CELL_CANCEL + 0u};
return true;
});
@ -892,7 +892,7 @@ error_code sys_spu_thread_group_resume(ppu_thread& ppu, u32 id)
return false;
}
error = CellError{CELL_CANCEL};
error = CellError{CELL_CANCEL + 0u};
return true;
});

View file

@ -124,7 +124,7 @@ void emu_settings::LoadSettings(const std::string& title_id)
if (!custom_config_path.empty())
{
if (config = fs::file(custom_config_path, fs::read + fs::write))
if ((config = fs::file(custom_config_path, fs::read + fs::write)))
{
auto [custom_config, custom_error] = yaml_load(config.to_string());
config.close();
@ -685,6 +685,7 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_
{
case np_psn_status::disabled: return tr("Disconnected", "PSN Status");
case np_psn_status::fake: return tr("Simulated", "PSN Status");
case np_psn_status::rpcn: return tr("RPCN", "PSN Status");
}
break;
case emu_settings_type::SleepTimersAccuracy:

View file

@ -399,7 +399,7 @@ namespace gui
{
bool match = true;
for (const auto [role, data] : criteria)
for (const auto& [role, data] : criteria)
{
if (item->data(0, role) != data)
{