mirror of https://github.com/mgba-emu/mgba.git
Use C++11 override and nullptr
This commit is contained in:
parent
6341172813
commit
3b7dbdecba
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -10,7 +10,7 @@ using namespace QGBA;
|
|||
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);
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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 @@ public slots:
|
|||
#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:
|
||||
|
|
Loading…
Reference in New Issue