cleanup: fix compiler warnings in recently edited files.

Replace NULL -> nullptr
Remove spurious semicolon

Signed-off-by: Michael WERLE <micha@michaelwerle.com>
This commit is contained in:
Michael Werle 2022-08-17 10:20:11 +09:00 committed by Dirk Hohndel
parent efb1832db8
commit 881a9cac4e
3 changed files with 5 additions and 5 deletions

View file

@ -42,7 +42,7 @@ public:
static double font_size() { return prefs.font_size; } static double font_size() { return prefs.font_size; }
static double mobile_scale() { return prefs.mobile_scale; } static double mobile_scale() { return prefs.mobile_scale; }
static bool display_invalid_dives() { return prefs.display_invalid_dives; } static bool display_invalid_dives() { return prefs.display_invalid_dives; }
static QString lastDir() { return st_lastDir; ; } static QString lastDir() { return st_lastDir; }
static bool show_developer() { return prefs.show_developer; } static bool show_developer() { return prefs.show_developer; }
static QString theme() { return st_theme; } static QString theme() { return st_theme; }
static QPointF tooltip_position() { return st_tooltip_position; } static QPointF tooltip_position() { return st_tooltip_position; }

View file

@ -19,7 +19,7 @@ static bool isReady = false;
#define CHECK_IS_READY_RETURN_VOID() \ #define CHECK_IS_READY_RETURN_VOID() \
if (!isReady) return if (!isReady) return
MapWidget *MapWidget::m_instance = NULL; MapWidget *MapWidget::m_instance = nullptr;
MapWidget::MapWidget(QWidget *parent) : QQuickWidget(parent) MapWidget::MapWidget(QWidget *parent) : QQuickWidget(parent)
{ {
@ -128,12 +128,12 @@ void MapWidget::divesChanged(const QVector<dive *> &, DiveField field)
// the reference is cleared. Sad. // the reference is cleared. Sad.
MapWidget::~MapWidget() MapWidget::~MapWidget()
{ {
m_instance = NULL; m_instance = nullptr;
} }
MapWidget *MapWidget::instance() MapWidget *MapWidget::instance()
{ {
if (m_instance == NULL) if (m_instance == nullptr)
m_instance = new MapWidget(); m_instance = new MapWidget();
return m_instance; return m_instance;
} }

View file

@ -222,7 +222,7 @@ MapLocation *MapLocationModel::getMapLocation(const struct dive_site *ds)
if (ds == location->divesite) if (ds == location->divesite)
return location; return location;
} }
return NULL; return nullptr;
} }
void MapLocationModel::diveSiteChanged(struct dive_site *ds, int field) void MapLocationModel::diveSiteChanged(struct dive_site *ds, int field)