Fix some "-Wpedantic" warnings

This commit is contained in:
scribam
2019-05-12 23:01:28 +02:00
committed by Ivan
parent 99c1f87289
commit 790962425c
17 changed files with 33 additions and 33 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ namespace logs
void set_level(const std::string&, level);
}
#define LOG_CHANNEL(ch, ...) ::logs::channel ch(#ch, ##__VA_ARGS__);
#define LOG_CHANNEL(ch, ...) ::logs::channel ch(#ch, ##__VA_ARGS__)
// Legacy:
+2 -2
View File
@@ -572,7 +572,7 @@ namespace utils
return vec.overlaps(*this);
}
}; // namespace utils
} // namespace utils
namespace std {
@@ -587,4 +587,4 @@ namespace std {
return (size_t{ k.start } << 32) | size_t{ k.end };
}
};
};
}
+10 -10
View File
@@ -65,16 +65,16 @@ class PPUTranslator final : public cpu_translator
llvm::Value*& loc = m_locals[pos];\
llvm::Value*& glb = m_globals[pos];
DEF_VALUE(m_lr, m_g_lr, 163); // LR, Link Register
DEF_VALUE(m_ctr, m_g_ctr, 164); // CTR, Counter Register
DEF_VALUE(m_vrsave, m_g_vrsave, 165);
DEF_VALUE(m_cia, m_g_cia, 166);
DEF_VALUE(m_so, m_g_so, 167); // XER.SO bit, summary overflow
DEF_VALUE(m_ov, m_g_ov, 168); // XER.OV bit, overflow flag
DEF_VALUE(m_ca, m_g_ca, 169); // XER.CA bit, carry flag
DEF_VALUE(m_cnt, m_g_cnt, 170); // XER.CNT
DEF_VALUE(m_sat, m_g_sat, 171); // VSCR.SAT bit, sticky saturation flag
DEF_VALUE(m_nj, m_g_nj, 172); // VSCR.NJ bit, non-Java mode
DEF_VALUE(m_lr, m_g_lr, 163) // LR, Link Register
DEF_VALUE(m_ctr, m_g_ctr, 164) // CTR, Counter Register
DEF_VALUE(m_vrsave, m_g_vrsave, 165)
DEF_VALUE(m_cia, m_g_cia, 166)
DEF_VALUE(m_so, m_g_so, 167) // XER.SO bit, summary overflow
DEF_VALUE(m_ov, m_g_ov, 168) // XER.OV bit, overflow flag
DEF_VALUE(m_ca, m_g_ca, 169) // XER.CA bit, carry flag
DEF_VALUE(m_cnt, m_g_cnt, 170) // XER.CNT
DEF_VALUE(m_sat, m_g_sat, 171) // VSCR.SAT bit, sticky saturation flag
DEF_VALUE(m_nj, m_g_nj, 172) // VSCR.NJ bit, non-Java mode
#undef DEF_VALUE
public:
+1 -1
View File
@@ -62,7 +62,7 @@ static FORCE_INLINE void mov_rdata(u128* const dst, const u128* const src)
dst[6] = data0;
dst[7] = data1;
}
};
}
extern u64 get_timebased_time();
extern u64 get_system_time();
+1 -1
View File
@@ -39,4 +39,4 @@ fs::file pup_object::get_file(u64 entry_id)
}
}
return fs::file();
};
}
+1 -1
View File
@@ -884,7 +884,7 @@ int evdev_joystick_handler::FindAxisDirection(const std::unordered_map<int, bool
return -1;
else
return it->second;
};
}
bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std::string& device)
{
+1 -1
View File
@@ -55,7 +55,7 @@ namespace pad
static inline class pad_thread* get_current_handler()
{
return verify(HERE, g_current.load());
};
}
static inline void SetIntercepted(bool intercepted)
{
+2 -2
View File
@@ -26,7 +26,7 @@
class debugger_frame : public custom_dock_widget
{
Q_OBJECT;
Q_OBJECT
const QString NoThreadString = tr("No Thread");
const QString RunString = tr("Run");
@@ -100,4 +100,4 @@ private Q_SLOTS:
void EnableUpdateTimer(bool state);
};
Q_DECLARE_METATYPE(u32);
Q_DECLARE_METATYPE(u32)
+1 -1
View File
@@ -98,7 +98,7 @@ namespace cfg_adapter
{
return get_node(node, loc.cbegin(), loc.cend());
}
};
}
/** Returns possible options for values for some particular setting.*/
static QStringList getOptions(cfg_location location)
+2 -2
View File
@@ -94,7 +94,7 @@ namespace gui
default:
return "";
}
};
}
const QSize gl_icon_size_min = QSize(40, 22);
const QSize gl_icon_size_small = QSize(80, 44);
@@ -108,7 +108,7 @@ namespace gui
int size_delta = gl_icon_size_max.width() - gl_icon_size_min.width();
int current_delta = current.width() - gl_icon_size_min.width();
return gl_max_slider_pos * current_delta / size_delta;
};
}
inline q_string_pair Recent_Game(const QString& path, const QString& title)
{
+1 -1
View File
@@ -56,7 +56,7 @@ kernel_explorer::kernel_explorer(QWidget* parent) : QDialog(parent)
connect(button_refresh, &QAbstractButton::clicked, this, &kernel_explorer::Update);
Update();
};
}
constexpr auto qstr = QString::fromStdString;
+2 -2
View File
@@ -1027,7 +1027,7 @@ void main_window::BootRecentAction(const QAction* act)
LOG_NOTICE(LOADER, "Booting from recent games list...");
Boot(path, "", true);
};
}
QAction* main_window::CreateRecentAction(const q_string_pair& entry, const uint& sc_idx)
{
@@ -1069,7 +1069,7 @@ QAction* main_window::CreateRecentAction(const q_string_pair& entry, const uint&
connect(act, &QAction::triggered, [=]() {BootRecentAction(act); });
return act;
};
}
void main_window::AddRecentAction(const q_string_pair& entry)
{
+1 -1
View File
@@ -25,7 +25,7 @@ memory_string_searcher::memory_string_searcher(QWidget* parent)
connect(button_search, &QAbstractButton::clicked, this, &memory_string_searcher::OnSearch);
layout()->setSizeConstraint(QLayout::SetFixedSize);
};
}
void memory_string_searcher::OnSearch()
{
+1 -1
View File
@@ -46,7 +46,7 @@ inline bool CreateConfigFile(const QString& dir, const QString& name)
new_file.close();
return true;
};
}
pad_settings_dialog::pad_settings_dialog(QWidget *parent, const GameInfo *game)
: QDialog(parent), ui(new Ui::pad_settings_dialog)
+1 -1
View File
@@ -21,7 +21,7 @@ struct pad_info
bool is_connected{false};
};
Q_DECLARE_METATYPE(pad_info);
Q_DECLARE_METATYPE(pad_info)
class pad_settings_dialog : public QDialog
{
+3 -3
View File
@@ -108,7 +108,7 @@ namespace gui
dummy_color.setObjectName(object_name);
dummy_color.ensurePolished();
return dummy_color.palette().color(color_role);
};
}
QFont get_label_font(const QString& object_name)
{
@@ -116,7 +116,7 @@ namespace gui
dummy_font.setObjectName(object_name);
dummy_font.ensurePolished();
return dummy_font.font();
};
}
QImage get_opaque_image_area(const QString& path)
{
@@ -176,7 +176,7 @@ namespace gui
max_width += combo->view()->autoScrollMargin();
combo->view()->setMinimumWidth(max_width);
}
};
}
void update_table_item_count(QTableWidget* table)
{
+2 -2
View File
@@ -371,7 +371,7 @@ Buffer::Buffer(bool isTex, u32 id, const QString& name, QWidget* parent)
setLayout(layout);
installEventFilter(parent);
};
}
// Draws a formatted and buffered <image> inside the Buffer Widget
void Buffer::showImage(const QImage& image)
@@ -500,7 +500,7 @@ namespace
}
return buffer;
}
};
}
void rsx_debugger::OnClickDrawCalls()
{