Qt: Resolve -Wreorder warnings

This commit is contained in:
Lioncash 2017-05-16 21:14:11 -04:00 committed by endrift
parent ccfb9f24f5
commit 686380b6c4
12 changed files with 35 additions and 35 deletions

View File

@ -13,8 +13,8 @@ using namespace QGBA;
AssetView::AssetView(GameController* controller, QWidget* parent) AssetView::AssetView(GameController* controller, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_controller(controller)
, m_tileCache(controller->tileCache()) , m_tileCache(controller->tileCache())
, m_controller(controller)
{ {
m_updateTimer.setSingleShot(true); m_updateTimer.setSingleShot(true);
m_updateTimer.setInterval(1); m_updateTimer.setInterval(1);

View File

@ -11,8 +11,8 @@ using namespace QGBA;
DebuggerController::DebuggerController(GameController* controller, mDebugger* debugger, QObject* parent) DebuggerController::DebuggerController(GameController* controller, mDebugger* debugger, QObject* parent)
: QObject(parent) : QObject(parent)
, m_gameController(controller)
, m_debugger(debugger) , m_debugger(debugger)
, m_gameController(controller)
{ {
} }

View File

@ -48,6 +48,7 @@ GameController::GameController(QObject* parent)
, m_gameOpen(false) , m_gameOpen(false)
, m_vf(nullptr) , m_vf(nullptr)
, m_useBios(false) , m_useBios(false)
, m_override(nullptr)
, m_audioProcessor(AudioProcessor::create()) , m_audioProcessor(AudioProcessor::create())
, m_pauseAfterFrame(false) , m_pauseAfterFrame(false)
, m_sync(true) , m_sync(true)
@ -62,16 +63,15 @@ GameController::GameController(QObject* parent)
, m_videoLayers() , m_videoLayers()
, m_autofire{} , m_autofire{}
, m_autofireStatus{} , m_autofireStatus{}
, m_inputController(nullptr)
, m_multiplayer(nullptr)
, m_stream(nullptr)
, m_stateSlot(1) , m_stateSlot(1)
, m_backupLoadState(nullptr) , m_backupLoadState(nullptr)
, m_backupSaveState(nullptr) , m_backupSaveState(nullptr)
, m_saveStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_CHEATS | SAVESTATE_RTC) , m_saveStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_CHEATS | SAVESTATE_RTC)
, m_loadStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_RTC) , m_loadStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_RTC)
, m_preload(false) , m_preload(false)
, m_override(nullptr) , m_inputController(nullptr)
, m_multiplayer(nullptr)
, m_stream(nullptr)
, m_vl(nullptr) , m_vl(nullptr)
, m_vlVf(nullptr) , m_vlVf(nullptr)
{ {

View File

@ -21,16 +21,16 @@ Q_OBJECT
public: public:
struct RegisterItem { struct RegisterItem {
RegisterItem(const QString& description, uint start, uint size = 1, bool readonly = false) RegisterItem(const QString& description, uint start, uint size = 1, bool readonly = false)
: description(description) : start(start)
, start(start)
, size(size) , size(size)
, readonly(readonly) {} , readonly(readonly)
, description(description) {}
RegisterItem(const QString& description, uint start, uint size, QStringList items, bool readonly = false) RegisterItem(const QString& description, uint start, uint size, QStringList items, bool readonly = false)
: description(description) : start(start)
, start(start)
, size(size) , size(size)
, items(items) , readonly(readonly)
, readonly(readonly) {} , description(description)
, items(items) {}
uint start; uint start;
uint size; uint size;
bool readonly; bool readonly;

View File

@ -26,16 +26,16 @@ mSDLEvents InputController::s_sdlEvents;
InputController::InputController(int playerId, QWidget* topLevel, QObject* parent) InputController::InputController(int playerId, QWidget* topLevel, QObject* parent)
: QObject(parent) : QObject(parent)
, m_playerId(playerId)
, m_config(nullptr) , m_config(nullptr)
, m_gamepadTimer(nullptr) , m_playerId(playerId)
, m_allowOpposing(false)
, m_topLevel(topLevel)
, m_focusParent(topLevel)
#ifdef BUILD_SDL #ifdef BUILD_SDL
, m_sdlPlayer{} , m_sdlPlayer{}
, m_playerAttached(false) , m_playerAttached(false)
#endif #endif
, m_allowOpposing(false) , m_gamepadTimer(nullptr)
, m_topLevel(topLevel)
, m_focusParent(topLevel)
{ {
mInputMapInit(&m_inputMap, &GBAInputInfo); mInputMapInit(&m_inputMap, &GBAInputInfo);

View File

@ -179,8 +179,6 @@ constexpr InputProfile::InputProfile(const char* name,
keys.keyR, keys.keyR,
keys.keyL, keys.keyL,
} }
, m_shortcutButtons(shortcutButtons)
, m_shortcutAxes(shortcutAxes)
, m_axes { , m_axes {
axes.keyA, axes.keyA,
axes.keyB, axes.keyB,
@ -193,6 +191,8 @@ constexpr InputProfile::InputProfile(const char* name,
axes.keyR, axes.keyR,
axes.keyL, axes.keyL,
} }
, m_shortcutButtons(shortcutButtons)
, m_shortcutAxes(shortcutAxes)
, m_tiltAxis(tiltAxis) , m_tiltAxis(tiltAxis)
, m_gyroAxis(gyroAxis) , m_gyroAxis(gyroAxis)
, m_gyroSensitivity(gyroSensitivity) , m_gyroSensitivity(gyroSensitivity)

View File

@ -16,12 +16,12 @@ using namespace QGBA;
KeyEditor::KeyEditor(QWidget* parent) KeyEditor::KeyEditor(QWidget* parent)
: QLineEdit(parent) : QLineEdit(parent)
, m_direction(GamepadAxisEvent::NEUTRAL)
, m_hatDirection(GamepadHatEvent::CENTER)
, m_key(-1) , m_key(-1)
, m_axis(-1) , m_axis(-1)
, m_hat(-1) , m_hat(-1)
, m_button(false) , m_button(false)
, m_direction(GamepadAxisEvent::NEUTRAL)
, m_hatDirection(GamepadHatEvent::CENTER)
{ {
setAlignment(Qt::AlignCenter); setAlignment(Qt::AlignCenter);
setFocusPolicy(Qt::ClickFocus); setFocusPolicy(Qt::ClickFocus);

View File

@ -23,8 +23,8 @@ using namespace QGBA;
LoadSaveState::LoadSaveState(GameController* controller, QWidget* parent) LoadSaveState::LoadSaveState(GameController* controller, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_controller(controller) , m_controller(controller)
, m_currentFocus(controller->stateSlot() - 1)
, m_mode(LoadSave::LOAD) , m_mode(LoadSave::LOAD)
, m_currentFocus(controller->stateSlot() - 1)
{ {
setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_TranslucentBackground);
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@ -72,9 +72,9 @@ QString LogController::toString(int level) {
} }
LogController::Stream::Stream(LogController* controller, int level, int category) LogController::Stream::Stream(LogController* controller, int level, int category)
: m_log(controller) : m_level(level)
, m_level(level)
, m_category(category) , m_category(category)
, m_log(controller)
{ {
} }

View File

@ -27,11 +27,11 @@ using namespace QGBA;
MemoryModel::MemoryModel(QWidget* parent) MemoryModel::MemoryModel(QWidget* parent)
: QAbstractScrollArea(parent) : QAbstractScrollArea(parent)
, m_core(nullptr) , m_core(nullptr)
, m_codec(nullptr)
, m_top(0) , m_top(0)
, m_align(1) , m_align(1)
, m_selection(0, 0) , m_selection(0, 0)
, m_selectionAnchor(0) , m_selectionAnchor(0)
, m_codec(nullptr)
{ {
m_font.setFamily("Source Code Pro"); m_font.setFamily("Source Code Pro");
m_font.setStyleHint(QFont::Monospace); m_font.setStyleHint(QFont::Monospace);

View File

@ -555,8 +555,8 @@ ShortcutController::ShortcutItem::ShortcutItem(QAction* action, const QString& n
ShortcutController::ShortcutItem::ShortcutItem(ShortcutController::ShortcutItem::Functions functions, int shortcut, const QString& visibleName, const QString& name, ShortcutItem* parent) ShortcutController::ShortcutItem::ShortcutItem(ShortcutController::ShortcutItem::Functions functions, int shortcut, const QString& visibleName, const QString& name, ShortcutItem* parent)
: m_action(nullptr) : m_action(nullptr)
, m_shortcut(shortcut) , m_shortcut(shortcut)
, m_functions(functions)
, m_menu(nullptr) , m_menu(nullptr)
, m_functions(functions)
, m_name(name) , m_name(name)
, m_visibleName(visibleName) , m_visibleName(visibleName)
, m_button(-1) , m_button(-1)

View File

@ -65,11 +65,19 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
: QMainWindow(parent) : QMainWindow(parent)
, m_log(0) , m_log(0)
, m_logView(new LogView(&m_log)) , m_logView(new LogView(&m_log))
#ifdef USE_DEBUGGERS
, m_console(nullptr)
#endif
, m_stateWindow(nullptr) , m_stateWindow(nullptr)
, m_screenWidget(new WindowBackground()) , m_screenWidget(new WindowBackground())
, m_logo(":/res/mgba-1024.png") , m_logo(":/res/mgba-1024.png")
, m_config(config) , m_config(config)
, m_inputController(playerId, this) , m_inputController(playerId, this)
, m_mruMenu(nullptr)
, m_shortcutController(new ShortcutController(this))
, m_fullscreenOnStart(false)
, m_autoresume(false)
, m_wasOpened(false)
#ifdef USE_FFMPEG #ifdef USE_FFMPEG
, m_videoView(nullptr) , m_videoView(nullptr)
#endif #endif
@ -79,14 +87,6 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
#ifdef USE_GDB_STUB #ifdef USE_GDB_STUB
, m_gdbController(nullptr) , m_gdbController(nullptr)
#endif #endif
#ifdef USE_DEBUGGERS
, m_console(nullptr)
#endif
, m_mruMenu(nullptr)
, m_shortcutController(new ShortcutController(this))
, m_fullscreenOnStart(false)
, m_autoresume(false)
, m_wasOpened(false)
{ {
setFocusPolicy(Qt::StrongFocus); setFocusPolicy(Qt::StrongFocus);
setAcceptDrops(true); setAcceptDrops(true);