all repos — mgba @ 3b7dbdecbac880fc204a42384151bf34ed35837c

mGBA Game Boy Advance Emulator

Use C++11 override and nullptr
Jeffrey Pfau jeffrey@endrift.com
Sun, 02 Feb 2014 01:42:36 -0800
commit

3b7dbdecbac880fc204a42384151bf34ed35837c

parent

63411728135bde082913d36c67f42ab2f1d703fc

M src/platform/qt/AudioDevice.hsrc/platform/qt/AudioDevice.h

@@ -16,7 +16,7 @@ class AudioThread : public QThread {

Q_OBJECT public: - AudioThread(QObject* parent = 0); + AudioThread(QObject* parent = nullptr); void setInput(GBAAudio* input);

@@ -35,13 +35,13 @@ class AudioDevice : public QIODevice {

Q_OBJECT public: - AudioDevice(GBAAudio* audio, QObject* parent = 0); + AudioDevice(GBAAudio* audio, QObject* parent = nullptr); void setFormat(const QAudioFormat& format); protected: - virtual qint64 readData(char* data, qint64 maxSize); - virtual qint64 writeData(const char* data, qint64 maxSize); + virtual qint64 readData(char* data, qint64 maxSize) override; + virtual qint64 writeData(const char* data, qint64 maxSize) override; private: GBAAudio* m_audio;
M src/platform/qt/Display.hsrc/platform/qt/Display.h

@@ -14,15 +14,15 @@ class Display : public QGLWidget {

Q_OBJECT public: - Display(QWidget* parent = 0); + Display(QWidget* parent = nullptr); public slots: void startDrawing(const uint32_t* buffer, GBAThread* context); void stopDrawing(); protected: - virtual void paintEvent(QPaintEvent*) {}; - virtual void resizeEvent(QResizeEvent*); + virtual void paintEvent(QPaintEvent*) override {}; + virtual void resizeEvent(QResizeEvent*) override; private: Painter* m_painter;
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -10,7 +10,7 @@

GameController::GameController(QObject* parent) : QObject(parent) , m_drawContext(new uint32_t[256 * 256]) - , m_audioContext(0) + , m_audioContext(nullptr) { m_renderer = new GBAVideoSoftwareRenderer; GBAVideoSoftwareRendererCreate(m_renderer);
M src/platform/qt/GameController.hsrc/platform/qt/GameController.h

@@ -22,7 +22,7 @@ class GameController : public QObject {

Q_OBJECT public: - GameController(QObject* parent = 0); + GameController(QObject* parent = nullptr); ~GameController(); const uint32_t* drawContext() const { return m_drawContext; }
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -19,7 +19,7 @@ class Window : public QMainWindow {

Q_OBJECT public: - Window(QWidget* parent = 0); + Window(QWidget* parent = nullptr); static GBAKey mapKey(int qtKey); signals:

@@ -34,8 +34,8 @@ void gdbOpen();

#endif protected: - virtual void keyPressEvent(QKeyEvent* event); - virtual void keyReleaseEvent(QKeyEvent* event); + virtual void keyPressEvent(QKeyEvent* event) override; + virtual void keyReleaseEvent(QKeyEvent* event) override; virtual void closeEvent(QCloseEvent*) override; private slots: