all repos — mgba @ 686380b6c4d8acf219a704a8932668b11efc47c2

mGBA Game Boy Advance Emulator

Qt: Resolve -Wreorder warnings
Lioncash mathew1800@gmail.com
Tue, 16 May 2017 21:14:11 -0400
commit

686380b6c4d8acf219a704a8932668b11efc47c2

parent

ccfb9f24f53c4d5d0d78573d46fe7bcea60126bd

M src/platform/qt/AssetView.cppsrc/platform/qt/AssetView.cpp

@@ -13,8 +13,8 @@ using namespace QGBA;

AssetView::AssetView(GameController* controller, QWidget* parent) : QWidget(parent) - , m_controller(controller) , m_tileCache(controller->tileCache()) + , m_controller(controller) { m_updateTimer.setSingleShot(true); m_updateTimer.setInterval(1);
M src/platform/qt/DebuggerController.cppsrc/platform/qt/DebuggerController.cpp

@@ -11,8 +11,8 @@ using namespace QGBA;

DebuggerController::DebuggerController(GameController* controller, mDebugger* debugger, QObject* parent) : QObject(parent) - , m_gameController(controller) , m_debugger(debugger) + , m_gameController(controller) { }
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -48,6 +48,7 @@ , m_logLevels(0)

, m_gameOpen(false) , m_vf(nullptr) , m_useBios(false) + , m_override(nullptr) , m_audioProcessor(AudioProcessor::create()) , m_pauseAfterFrame(false) , m_sync(true)

@@ -62,16 +63,15 @@ , m_audioChannels()

, m_videoLayers() , m_autofire{} , m_autofireStatus{} - , m_inputController(nullptr) - , m_multiplayer(nullptr) - , m_stream(nullptr) , m_stateSlot(1) , m_backupLoadState(nullptr) , m_backupSaveState(nullptr) , m_saveStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_CHEATS | SAVESTATE_RTC) , m_loadStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_RTC) , m_preload(false) - , m_override(nullptr) + , m_inputController(nullptr) + , m_multiplayer(nullptr) + , m_stream(nullptr) , m_vl(nullptr) , m_vlVf(nullptr) {
M src/platform/qt/IOViewer.hsrc/platform/qt/IOViewer.h

@@ -21,16 +21,16 @@

public: struct RegisterItem { RegisterItem(const QString& description, uint start, uint size = 1, bool readonly = false) - : description(description) - , start(start) + : start(start) , size(size) - , readonly(readonly) {} + , readonly(readonly) + , description(description) {} RegisterItem(const QString& description, uint start, uint size, QStringList items, bool readonly = false) - : description(description) - , start(start) + : start(start) , size(size) - , items(items) - , readonly(readonly) {} + , readonly(readonly) + , description(description) + , items(items) {} uint start; uint size; bool readonly;
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -26,16 +26,16 @@ #endif

InputController::InputController(int playerId, QWidget* topLevel, QObject* parent) : QObject(parent) + , m_config(nullptr) , m_playerId(playerId) - , m_config(nullptr) - , m_gamepadTimer(nullptr) + , m_allowOpposing(false) + , m_topLevel(topLevel) + , m_focusParent(topLevel) #ifdef BUILD_SDL , m_sdlPlayer{} , m_playerAttached(false) #endif - , m_allowOpposing(false) - , m_topLevel(topLevel) - , m_focusParent(topLevel) + , m_gamepadTimer(nullptr) { mInputMapInit(&m_inputMap, &GBAInputInfo);
M src/platform/qt/InputProfile.cppsrc/platform/qt/InputProfile.cpp

@@ -179,8 +179,6 @@ keys.keyDown,

keys.keyR, keys.keyL, } - , m_shortcutButtons(shortcutButtons) - , m_shortcutAxes(shortcutAxes) , m_axes { axes.keyA, axes.keyB,

@@ -193,6 +191,8 @@ axes.keyDown,

axes.keyR, axes.keyL, } + , m_shortcutButtons(shortcutButtons) + , m_shortcutAxes(shortcutAxes) , m_tiltAxis(tiltAxis) , m_gyroAxis(gyroAxis) , m_gyroSensitivity(gyroSensitivity)
M src/platform/qt/KeyEditor.cppsrc/platform/qt/KeyEditor.cpp

@@ -16,12 +16,12 @@ using namespace QGBA;

KeyEditor::KeyEditor(QWidget* parent) : QLineEdit(parent) - , m_direction(GamepadAxisEvent::NEUTRAL) - , m_hatDirection(GamepadHatEvent::CENTER) , m_key(-1) , m_axis(-1) , m_hat(-1) , m_button(false) + , m_direction(GamepadAxisEvent::NEUTRAL) + , m_hatDirection(GamepadHatEvent::CENTER) { setAlignment(Qt::AlignCenter); setFocusPolicy(Qt::ClickFocus);
M src/platform/qt/LoadSaveState.cppsrc/platform/qt/LoadSaveState.cpp

@@ -23,8 +23,8 @@

LoadSaveState::LoadSaveState(GameController* controller, QWidget* parent) : QWidget(parent) , m_controller(controller) - , m_currentFocus(controller->stateSlot() - 1) , m_mode(LoadSave::LOAD) + , m_currentFocus(controller->stateSlot() - 1) { setAttribute(Qt::WA_TranslucentBackground); m_ui.setupUi(this);
M src/platform/qt/LogController.cppsrc/platform/qt/LogController.cpp

@@ -72,9 +72,9 @@ return QString();

} LogController::Stream::Stream(LogController* controller, int level, int category) - : m_log(controller) - , m_level(level) + : m_level(level) , m_category(category) + , m_log(controller) { }
M src/platform/qt/MemoryModel.cppsrc/platform/qt/MemoryModel.cpp

@@ -27,11 +27,11 @@

MemoryModel::MemoryModel(QWidget* parent) : QAbstractScrollArea(parent) , m_core(nullptr) + , m_codec(nullptr) , m_top(0) , m_align(1) , m_selection(0, 0) , m_selectionAnchor(0) - , m_codec(nullptr) { m_font.setFamily("Source Code Pro"); m_font.setStyleHint(QFont::Monospace);
M src/platform/qt/ShortcutController.cppsrc/platform/qt/ShortcutController.cpp

@@ -555,8 +555,8 @@

ShortcutController::ShortcutItem::ShortcutItem(ShortcutController::ShortcutItem::Functions functions, int shortcut, const QString& visibleName, const QString& name, ShortcutItem* parent) : m_action(nullptr) , m_shortcut(shortcut) - , m_functions(functions) , m_menu(nullptr) + , m_functions(functions) , m_name(name) , m_visibleName(visibleName) , m_button(-1)
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -65,11 +65,19 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)

: QMainWindow(parent) , m_log(0) , m_logView(new LogView(&m_log)) +#ifdef USE_DEBUGGERS + , m_console(nullptr) +#endif , m_stateWindow(nullptr) , m_screenWidget(new WindowBackground()) , m_logo(":/res/mgba-1024.png") , m_config(config) , m_inputController(playerId, this) + , m_mruMenu(nullptr) + , m_shortcutController(new ShortcutController(this)) + , m_fullscreenOnStart(false) + , m_autoresume(false) + , m_wasOpened(false) #ifdef USE_FFMPEG , m_videoView(nullptr) #endif

@@ -79,14 +87,6 @@ #endif

#ifdef USE_GDB_STUB , m_gdbController(nullptr) #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); setAcceptDrops(true);