Restore -Wenum-compare and fix some [=] warnings

This commit is contained in:
Nekotekina 2020-02-18 17:09:38 +03:00
parent 0ee2f761ae
commit 8a176de6a1
5 changed files with 7 additions and 8 deletions

View File

@ -235,7 +235,7 @@ private:
std::unique_ptr<AudioDumper> m_dump;
std::unique_ptr<float[]> buffer[MAX_AUDIO_BUFFERS];
const float silence_buffer[AUDIO_MAX_CHANNELS_COUNT * AUDIO_BUFFER_SAMPLES] = { 0 };
const float silence_buffer[u32{AUDIO_MAX_CHANNELS_COUNT} * u32{AUDIO_BUFFER_SAMPLES}] = { 0 };
bool backend_open = false;
bool playing = false;

View File

@ -1307,11 +1307,11 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point)
// Fill register access info
if (auto iflags = s_spu_iflag.decode(data))
{
if (iflags & spu_iflag::use_ra)
if (+iflags & +spu_iflag::use_ra)
m_use_ra[pos / 4] = op.ra;
if (iflags & spu_iflag::use_rb)
if (+iflags & +spu_iflag::use_rb)
m_use_rb[pos / 4] = op.rb;
if (iflags & spu_iflag::use_rc)
if (+iflags & +spu_iflag::use_rc)
m_use_rc[pos / 4] = op.rc;
}

View File

@ -292,7 +292,7 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con
auto data = GetButtonValues(device);
auto find_value = [=](const std::string& name)
auto find_value = [=, this](const std::string& name)
{
int key = FindKeyCodeByString(rev_axis_list, name, false);
bool dir = key >= 0;

View File

@ -37,7 +37,6 @@ else()
add_compile_options(-Wno-invalid-offsetof)
add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-attributes)
add_compile_options(-Wno-enum-compare)
add_compile_options(-Wno-comment)
add_compile_options(-Wno-sign-compare)

View File

@ -1299,7 +1299,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
{
const std::string game_title_format = xemu_settings->GetSetting(emu_settings::WindowTitleFormat);
auto get_game_window_title_label = [=](const QString& new_format)
auto get_game_window_title_label = [=, this](const QString& new_format)
{
rpcs3::title_format_data title_data;
title_data.format = sstr(new_format);