From 35bab343531e752a729a6adb5f81b1c3ed8d22dd Mon Sep 17 00:00:00 2001 From: murata Date: Sun, 11 Aug 2019 17:11:22 +0900 Subject: [PATCH] QGC: Change NULL or 0 to nullptr --- src/QGCComboBox.h | 2 +- src/QGCFileDownload.h | 2 +- src/QGCLoggingCategory.cc | 2 +- src/QGCMapPalette.h | 2 +- src/QGCQGeoCoordinate.h | 2 +- src/QGCTemporaryFile.h | 2 +- src/TerrainTile.cc | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/QGCComboBox.h b/src/QGCComboBox.h index 43f2b415b..9949ba41a 100644 --- a/src/QGCComboBox.h +++ b/src/QGCComboBox.h @@ -23,7 +23,7 @@ class QGCComboBox : public QComboBox { Q_OBJECT public: - QGCComboBox(QWidget* parent = NULL); + QGCComboBox(QWidget* parent = nullptr); /// @brief Sets the current index on the combo. Signals activated, as well as currentIndexChanged. void simulateUserSetCurrentIndex(int index); diff --git a/src/QGCFileDownload.h b/src/QGCFileDownload.h index 4b14f8717..a4a637fd7 100644 --- a/src/QGCFileDownload.h +++ b/src/QGCFileDownload.h @@ -18,7 +18,7 @@ class QGCFileDownload : public QNetworkAccessManager Q_OBJECT public: - QGCFileDownload(QObject* parent = NULL); + QGCFileDownload(QObject* parent = nullptr); /// Download the specified remote file. /// @param remoteFile File to download. Can be http address or file system path. diff --git a/src/QGCLoggingCategory.cc b/src/QGCLoggingCategory.cc index c39126f02..15b8c7f32 100644 --- a/src/QGCLoggingCategory.cc +++ b/src/QGCLoggingCategory.cc @@ -25,7 +25,7 @@ QGC_LOGGING_CATEGORY(GeotaggingLog, "GeotaggingLog") QGC_LOGGING_CATEGORY(RTKGPSLog, "RTKGPSLog") QGC_LOGGING_CATEGORY(GuidedActionsControllerLog, "GuidedActionsControllerLog") -QGCLoggingCategoryRegister* _instance = NULL; +QGCLoggingCategoryRegister* _instance = nullptr; const char* QGCLoggingCategoryRegister::_filterRulesSettingsGroup = "LoggingFilters"; QGCLoggingCategoryRegister* QGCLoggingCategoryRegister::instance(void) diff --git a/src/QGCMapPalette.h b/src/QGCMapPalette.h index 7896c6746..25a1bd90f 100644 --- a/src/QGCMapPalette.h +++ b/src/QGCMapPalette.h @@ -47,7 +47,7 @@ class QGCMapPalette : public QObject Q_PROPERTY(QColor thumbJoystick READ thumbJoystick NOTIFY paletteChanged) public: - QGCMapPalette(QObject* parent = NULL); + QGCMapPalette(QObject* parent = nullptr); /// Text color QColor text(void) const { return _text[_lightColors ? 0 : 1]; } diff --git a/src/QGCQGeoCoordinate.h b/src/QGCQGeoCoordinate.h index f02f26d17..1e9bc3aad 100644 --- a/src/QGCQGeoCoordinate.h +++ b/src/QGCQGeoCoordinate.h @@ -18,7 +18,7 @@ class QGCQGeoCoordinate : public QObject Q_OBJECT public: - QGCQGeoCoordinate(const QGeoCoordinate& coord, QObject* parent = NULL); + QGCQGeoCoordinate(const QGeoCoordinate& coord, QObject* parent = nullptr); Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged) Q_PROPERTY(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) diff --git a/src/QGCTemporaryFile.h b/src/QGCTemporaryFile.h index 670e824e6..c46b6bbcc 100644 --- a/src/QGCTemporaryFile.h +++ b/src/QGCTemporaryFile.h @@ -28,7 +28,7 @@ public: // QStandardPaths::TempLocation directory. // @param template Template for file name following QTemporaryFile rules. Template should NOT include // directory path, only file name. - QGCTemporaryFile(const QString& fileTemplate, QObject* parent = NULL); + QGCTemporaryFile(const QString& fileTemplate, QObject* parent = nullptr); /// @brief Opens the file in ReadWrite mode. /// @returns false - open failed diff --git a/src/TerrainTile.cc b/src/TerrainTile.cc index 55f485a23..1b2af80f9 100644 --- a/src/TerrainTile.cc +++ b/src/TerrainTile.cc @@ -24,7 +24,7 @@ TerrainTile::TerrainTile() : _minElevation(-1.0) , _maxElevation(-1.0) , _avgElevation(-1.0) - , _data(NULL) + , _data(nullptr) , _gridSizeLat(-1) , _gridSizeLon(-1) , _isValid(false) @@ -39,7 +39,7 @@ TerrainTile::~TerrainTile() delete _data[i]; } delete _data; - _data = NULL; + _data = nullptr; } } @@ -48,7 +48,7 @@ TerrainTile::TerrainTile(QByteArray byteArray) : _minElevation(-1.0) , _maxElevation(-1.0) , _avgElevation(-1.0) - , _data(NULL) + , _data(nullptr) , _gridSizeLat(-1) , _gridSizeLon(-1) , _isValid(false) -- 2.22.0