Unverified Commit e7e3818d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7674 from muramura/QGC_Change_NULL_or_0_to_nullptr

Global: change null or 0 to nullptr
parents f3b1e7bd f9a7d849
......@@ -41,7 +41,7 @@ AirspaceFlightInfo*
AirspaceFlightModel::get(int index)
{
if (index < 0 || index >= _flightEntries.count()) {
return NULL;
return nullptr;
}
return _flightEntries[index];
}
......
......@@ -104,9 +104,9 @@ QGCLogEntry::sizeStr() const
//----------------------------------------------------------------------------------------
LogDownloadController::LogDownloadController(void)
: _uas(NULL)
, _downloadData(NULL)
, _vehicle(NULL)
: _uas(nullptr)
, _downloadData(nullptr)
, _vehicle(nullptr)
, _requestingLogEntries(false)
, _downloadingLogs(false)
, _retries(0)
......@@ -137,7 +137,7 @@ LogDownloadController::_setActiveVehicle(Vehicle* vehicle)
_logEntriesModel.clear();
disconnect(_uas, &UASInterface::logEntry, this, &LogDownloadController::_logEntry);
disconnect(_uas, &UASInterface::logData, this, &LogDownloadController::_logData);
_uas = NULL;
_uas = nullptr;
}
_vehicle = vehicle;
if(_vehicle) {
......@@ -566,7 +566,7 @@ LogDownloadController::_getNextSelected()
}
}
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------------------
......@@ -575,7 +575,7 @@ LogDownloadController::_prepareLogDownload()
{
if(_downloadData) {
delete _downloadData;
_downloadData = NULL;
_downloadData = nullptr;
}
QGCLogEntry* entry = _getNextSelected();
if(!entry) {
......@@ -634,7 +634,7 @@ LogDownloadController::_prepareLogDownload()
}
_downloadData->entry->setStatus(tr("Error"));
delete _downloadData;
_downloadData = NULL;
_downloadData = nullptr;
}
return result;
}
......@@ -709,7 +709,7 @@ QGCLogEntry*
QGCLogModel::get(int index)
{
if (index < 0 || index >= _logEntries.count()) {
return NULL;
return nullptr;
}
return _logEntries[index];
}
......
......@@ -18,7 +18,7 @@ class APMAirframeComponent : public VehicleComponent
Q_OBJECT
public:
APMAirframeComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMAirframeComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -38,19 +38,19 @@
APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
: AutoPilotPlugin (vehicle, parent)
, _incorrectParameterVersion(false)
, _airframeComponent (NULL)
, _cameraComponent (NULL)
, _lightsComponent (NULL)
, _subFrameComponent (NULL)
, _flightModesComponent (NULL)
, _powerComponent (NULL)
, _motorComponent (NULL)
, _radioComponent (NULL)
, _safetyComponent (NULL)
, _sensorsComponent (NULL)
, _tuningComponent (NULL)
, _esp8266Component (NULL)
, _heliComponent (NULL)
, _airframeComponent (nullptr)
, _cameraComponent (nullptr)
, _lightsComponent (nullptr)
, _subFrameComponent (nullptr)
, _flightModesComponent (nullptr)
, _powerComponent (nullptr)
, _motorComponent (nullptr)
, _radioComponent (nullptr)
, _safetyComponent (nullptr)
, _sensorsComponent (nullptr)
, _tuningComponent (nullptr)
, _esp8266Component (nullptr)
, _heliComponent (nullptr)
{
#if !defined(NO_SERIAL_LINK) && !defined(__android__)
connect(vehicle->parameterManager(), &ParameterManager::parametersReadyChanged, this, &APMAutoPilotPlugin::_checkForBadCubeBlack);
......
......@@ -18,7 +18,7 @@ class APMCameraComponent : public VehicleComponent
Q_OBJECT
public:
APMCameraComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMCameraComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -73,9 +73,9 @@ CalWorkerThread::calibrate_return CalWorkerThread::calibrate(void)
for (size_t cur_mag=0; cur_mag<max_mags; cur_mag++) {
// Initialize to no memory allocated
worker_data.x[cur_mag] = NULL;
worker_data.y[cur_mag] = NULL;
worker_data.z[cur_mag] = NULL;
worker_data.x[cur_mag] = nullptr;
worker_data.y[cur_mag] = nullptr;
worker_data.z[cur_mag] = nullptr;
worker_data.calibration_counter_total[cur_mag] = 0;
}
......@@ -86,7 +86,7 @@ CalWorkerThread::calibrate_return CalWorkerThread::calibrate(void)
worker_data.x[cur_mag] = reinterpret_cast<float *>(malloc(sizeof(float) * calibration_points_maxcount));
worker_data.y[cur_mag] = reinterpret_cast<float *>(malloc(sizeof(float) * calibration_points_maxcount));
worker_data.z[cur_mag] = reinterpret_cast<float *>(malloc(sizeof(float) * calibration_points_maxcount));
if (worker_data.x[cur_mag] == NULL || worker_data.y[cur_mag] == NULL || worker_data.z[cur_mag] == NULL) {
if (worker_data.x[cur_mag] == nullptr || worker_data.y[cur_mag] == nullptr || worker_data.z[cur_mag] == nullptr) {
_emitVehicleTextMessage(QStringLiteral("[cal] ERROR: out of memory"));
result = calibrate_return_error;
}
......@@ -576,8 +576,8 @@ int CalWorkerThread::sphere_fit_least_squares(const float x[], const float y[],
}
APMCompassCal::APMCompassCal(void)
: _vehicle(NULL)
, _calWorkerThread(NULL)
: _vehicle(nullptr)
, _calWorkerThread(nullptr)
{
}
......
......@@ -26,7 +26,7 @@ class CalWorkerThread : public QThread
Q_OBJECT
public:
CalWorkerThread(Vehicle* vehicle, QObject* parent = NULL);
CalWorkerThread(Vehicle* vehicle, QObject* parent = nullptr);
// Cancel currently in progress calibration
void cancel(void) { _cancel = true; }
......
......@@ -18,7 +18,7 @@ class APMFlightModesComponent : public VehicleComponent
Q_OBJECT
public:
APMFlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMFlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -16,7 +16,7 @@ class APMHeliComponent : public VehicleComponent
Q_OBJECT
public:
APMHeliComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMHeliComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -18,7 +18,7 @@ class APMLightsComponent : public VehicleComponent
Q_OBJECT
public:
APMLightsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMLightsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -18,7 +18,7 @@ class APMMotorComponent : public MotorComponent
Q_OBJECT
public:
APMMotorComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMMotorComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
QUrl setupSource(void) const final;
......
......@@ -18,7 +18,7 @@ class APMPowerComponent : public VehicleComponent
Q_OBJECT
public:
APMPowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMPowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Overrides from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override { return QStringList(); }
......
......@@ -19,7 +19,7 @@ class APMRadioComponent : public VehicleComponent
Q_OBJECT
public:
APMRadioComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMRadioComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -18,7 +18,7 @@ class APMSafetyComponent : public VehicleComponent
Q_OBJECT
public:
APMSafetyComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMSafetyComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -18,7 +18,7 @@ class APMSensorsComponent : public VehicleComponent
Q_OBJECT
public:
APMSensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMSensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
bool compassSetupNeeded(void) const;
bool accelSetupNeeded(void) const;
......
......@@ -24,11 +24,11 @@ QGC_LOGGING_CATEGORY(APMSensorsComponentControllerVerboseLog, "APMSensorsCompone
const char* APMSensorsComponentController::_compassCalFitnessParam = "COMPASS_CAL_FIT";
APMSensorsComponentController::APMSensorsComponentController(void)
: _sensorsComponent(NULL)
, _statusLog(NULL)
, _progressBar(NULL)
, _nextButton(NULL)
, _cancelButton(NULL)
: _sensorsComponent(nullptr)
, _statusLog(nullptr)
, _progressBar(nullptr)
, _nextButton(nullptr)
, _cancelButton(nullptr)
, _showOrientationCalArea(false)
, _calTypeInProgress(CalTypeNone)
, _orientationCalDownSideDone(false)
......
......@@ -18,7 +18,7 @@ class APMSubFrameComponent : public VehicleComponent
Q_OBJECT
public:
APMSubFrameComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
APMSubFrameComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -59,7 +59,7 @@ signals:
protected:
/// All access to AutoPilotPugin objects is through getInstanceForAutoPilotPlugin
AutoPilotPlugin(QObject* parent = NULL) : QObject(parent) { }
AutoPilotPlugin(QObject* parent = nullptr) : QObject(parent) { }
Vehicle* _vehicle;
FirmwarePlugin* _firmwarePlugin;
......
......@@ -17,7 +17,7 @@ class ESP8266Component : public VehicleComponent
{
Q_OBJECT
public:
ESP8266Component (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
ESP8266Component (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList() const;
......
......@@ -19,7 +19,7 @@ class MotorComponent : public VehicleComponent
Q_OBJECT
public:
MotorComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
MotorComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -17,7 +17,7 @@ class SyslinkComponent : public VehicleComponent
{
Q_OBJECT
public:
SyslinkComponent (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
SyslinkComponent (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList() const;
......
......@@ -23,7 +23,7 @@ class GenericAutoPilotPlugin : public AutoPilotPlugin
Q_OBJECT
public:
GenericAutoPilotPlugin(Vehicle* vehicle, QObject* parent = NULL);
GenericAutoPilotPlugin(Vehicle* vehicle, QObject* parent = nullptr);
// Overrides from AutoPilotPlugin
const QVariantList& vehicleComponents(void) final;
......
......@@ -22,7 +22,7 @@ class AirframeComponent : public VehicleComponent
Q_OBJECT
public:
AirframeComponent(Vehicle* vehicles, AutoPilotPlugin* autopilot, QObject* parent = NULL);
AirframeComponent(Vehicle* vehicles, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;
......
......@@ -71,7 +71,7 @@ class Airframe : public QObject
Q_OBJECT
public:
Airframe(const QString& name, int autostartId, QObject* parent = NULL);
Airframe(const QString& name, int autostartId, QObject* parent = nullptr);
~Airframe();
Q_PROPERTY(QString text MEMBER _name CONSTANT)
......@@ -87,7 +87,7 @@ class AirframeType : public QObject
Q_OBJECT
public:
AirframeType(const QString& name, const QString& imageResource, QObject* parent = NULL);
AirframeType(const QString& name, const QString& imageResource, QObject* parent = nullptr);
~AirframeType();
Q_PROPERTY(QString name MEMBER _name CONSTANT)
......
......@@ -23,7 +23,7 @@ class CameraComponent : public VehicleComponent
Q_OBJECT
public:
CameraComponent (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
CameraComponent (Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList (void) const;
......
......@@ -22,7 +22,7 @@ class FlightModesComponent : public VehicleComponent
Q_OBJECT
public:
FlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
FlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;
......
......@@ -34,7 +34,7 @@ class PX4AirframeLoader : QObject
public:
/// @param uas Uas which this set of facts is associated with
PX4AirframeLoader(AutoPilotPlugin* autpilot,UASInterface* uas, QObject* parent = NULL);
PX4AirframeLoader(AutoPilotPlugin* autpilot,UASInterface* uas, QObject* parent = nullptr);
static void loadAirframeMetaData(void);
......
......@@ -30,16 +30,16 @@
PX4AutoPilotPlugin::PX4AutoPilotPlugin(Vehicle* vehicle, QObject* parent)
: AutoPilotPlugin(vehicle, parent)
, _incorrectParameterVersion(false)
, _airframeComponent(NULL)
, _radioComponent(NULL)
, _esp8266Component(NULL)
, _flightModesComponent(NULL)
, _sensorsComponent(NULL)
, _safetyComponent(NULL)
, _powerComponent(NULL)
, _motorComponent(NULL)
, _tuningComponent(NULL)
, _syslinkComponent(NULL)
, _airframeComponent(nullptr)
, _radioComponent(nullptr)
, _esp8266Component(nullptr)
, _flightModesComponent(nullptr)
, _sensorsComponent(nullptr)
, _safetyComponent(nullptr)
, _powerComponent(nullptr)
, _motorComponent(nullptr)
, _tuningComponent(nullptr)
, _syslinkComponent(nullptr)
{
if (!vehicle) {
qWarning() << "Internal error";
......
......@@ -18,7 +18,7 @@ class PX4RadioComponent : public VehicleComponent
Q_OBJECT
public:
PX4RadioComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
PX4RadioComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;
......
......@@ -18,7 +18,7 @@ class PX4TuningComponent : public VehicleComponent
Q_OBJECT
public:
PX4TuningComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
PX4TuningComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const final;
......
......@@ -22,7 +22,7 @@ class PowerComponent : public VehicleComponent
Q_OBJECT
public:
PowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
PowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Overrides from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -23,7 +23,7 @@ class SafetyComponent : public VehicleComponent
Q_OBJECT
public:
SafetyComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
SafetyComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -22,7 +22,7 @@ class SensorsComponent : public VehicleComponent
Q_OBJECT
public:
SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);
// Virtuals from VehicleComponent
QStringList setupCompleteChangedTriggerList(void) const override;
......
......@@ -19,15 +19,15 @@
QGC_LOGGING_CATEGORY(SensorsComponentControllerLog, "SensorsComponentControllerLog")
SensorsComponentController::SensorsComponentController(void)
: _statusLog (NULL)
, _progressBar (NULL)
, _compassButton (NULL)
, _gyroButton (NULL)
, _accelButton (NULL)
, _airspeedButton (NULL)
, _levelButton (NULL)
, _cancelButton (NULL)
, _setOrientationsButton (NULL)
: _statusLog (nullptr)
, _progressBar (nullptr)
, _compassButton (nullptr)
, _gyroButton (nullptr)
, _accelButton (nullptr)
, _airspeedButton (nullptr)
, _levelButton (nullptr)
, _cancelButton (nullptr)
, _setOrientationsButton (nullptr)
, _showOrientationCalArea (false)
, _gyroCalInProgress (false)
, _magCalInProgress (false)
......
......@@ -53,19 +53,19 @@ void FactGroup::_setupTimer()
Fact* FactGroup::getFact(const QString& name)
{
Fact* fact = NULL;
Fact* fact = nullptr;
if (name.contains(".")) {
QStringList parts = name.split(".");
if (parts.count() != 2) {
qWarning() << "Only single level of hierarchy supported";
return NULL;
return nullptr;
}
FactGroup * factGroup = getFactGroup(parts[0]);
if (!factGroup) {
qWarning() << "Unknown FactGroup" << parts[0];
return NULL;
return nullptr;
}
return factGroup->getFact(parts[1]);
......@@ -83,7 +83,7 @@ Fact* FactGroup::getFact(const QString& name)
FactGroup* FactGroup::getFactGroup(const QString& name)
{
FactGroup* factGroup = NULL;
FactGroup* factGroup = nullptr;
if (_nameToFactGroupMap.contains(name)) {
factGroup = _nameToFactGroupMap[name];
......
......@@ -26,8 +26,8 @@ class FactGroup : public QObject
Q_OBJECT
public:
FactGroup(int updateRateMsecs, const QString& metaDataFile, QObject* parent = NULL);
FactGroup(int updateRateMsecs, QObject* parent = NULL);
FactGroup(int updateRateMsecs, const QString& metaDataFile, QObject* parent = nullptr);
FactGroup(int updateRateMsecs, QObject* parent = nullptr);
Q_PROPERTY(QStringList factNames READ factNames CONSTANT)
Q_PROPERTY(QStringList factGroupNames READ factGroupNames CONSTANT)
......
......@@ -933,7 +933,7 @@ const FactMetaData::AppSettingsTranslation_s* FactMetaData::_findAppSettingsDist
return pAppSettingsTranslation;
}
}
return NULL;
return nullptr;
}
const FactMetaData::AppSettingsTranslation_s* FactMetaData::_findAppSettingsAreaUnitsTranslation(const QString& rawUnits)
......@@ -953,7 +953,7 @@ const FactMetaData::AppSettingsTranslation_s* FactMetaData::_findAppSettingsArea
}
}
return NULL;
return nullptr;
}
QVariant FactMetaData::metersToAppSettingsDistanceUnits(const QVariant& meters)
......
......@@ -48,7 +48,7 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
{
QVERIFY(_vehicle->parameterManager()->parameterExists(FactSystem::defaultComponentId, "RC_MAP_THROTTLE"));
Fact* fact = _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "RC_MAP_THROTTLE");
QVERIFY(fact != NULL);
QVERIFY(fact != nullptr);
QVariant factValue = fact->rawValue();
QCOMPARE(factValue.isValid(), true);
......@@ -59,7 +59,7 @@ void FactSystemTestBase::_parameter_specific_component_id_test(void)
{
QVERIFY(_vehicle->parameterManager()->parameterExists(MAV_COMP_ID_AUTOPILOT1, "RC_MAP_THROTTLE"));
Fact* fact = _vehicle->parameterManager()->getParameter(MAV_COMP_ID_AUTOPILOT1, "RC_MAP_THROTTLE");
QVERIFY(fact != NULL);
QVERIFY(fact != nullptr);
QVariant factValue = fact->rawValue();
QCOMPARE(factValue.isValid(), true);
QCOMPARE(factValue.toInt(), 3);
......
......@@ -19,7 +19,7 @@ class FactValueSliderListModel : public QAbstractListModel
Q_OBJECT
public:
FactValueSliderListModel(Fact& fact, QObject* parent = NULL);
FactValueSliderListModel(Fact& fact, QObject* parent = nullptr);
~FactValueSliderListModel();
/// The initial value of the Fact at the meta data specified decimal place precision
......
......@@ -35,7 +35,7 @@ const char* ParameterManager::_jsonParamValueKey = "value";
ParameterManager::ParameterManager(Vehicle* vehicle)
: QObject (vehicle)
, _vehicle (vehicle)
, _mavlink (NULL)
, _mavlink (nullptr)
, _loadProgress (0.0)
, _parametersReady (false)
, _missingParameters (false)
......@@ -45,7 +45,7 @@ ParameterManager::ParameterManager(Vehicle* vehicle)
, _metaDataAddedToFacts (false)
, _logReplay (vehicle->priorityLink() && vehicle->priorityLink()->isLogReplay())
, _parameterSetMajorVersion (-1)
, _parameterMetaData (NULL)
, _parameterMetaData (nullptr)
, _prevWaitingReadParamIndexCount (0)
, _prevWaitingReadParamNameCount (0)
, _prevWaitingWriteParamNameCount (0)
......@@ -330,7 +330,7 @@ void ParameterManager::_parameterUpdate(int vehicleId, int componentId, QString
_dataMutex.unlock();
Fact* fact = NULL;
Fact* fact = nullptr;
if (_mapParameterName2Variant[componentId].contains(parameterName)) {
fact = _mapParameterName2Variant[componentId][parameterName].value<Fact*>();
}
......@@ -1052,7 +1052,7 @@ void ParameterManager::_clearMetaData(void)
{
if (_parameterMetaData) {
_parameterMetaData->deleteLater();
_parameterMetaData = NULL;
_parameterMetaData = nullptr;
}
}
......@@ -1288,7 +1288,7 @@ void ParameterManager::cacheMetaDataFile(const QString& metaDataFile, MAV_AUTOPI
// Find the cache hit closest to this new file
int cacheMajorVersion, cacheMinorVersion;
QString cacheHit = ParameterManager::parameterMetaDataFile(NULL, firmwareType, newMajorVersion, cacheMajorVersion, cacheMinorVersion);
QString cacheHit = ParameterManager::parameterMetaDataFile(nullptr, firmwareType, newMajorVersion, cacheMajorVersion, cacheMinorVersion);
qCDebug(ParameterManagerLog) << "ParameterManager::cacheMetaDataFile cacheHit file:firmware:major;minor" << cacheHit << cacheMajorVersion << cacheMinorVersion;
bool cacheNewFile = false;
......
......@@ -148,7 +148,7 @@ class APMFirmwarePluginInstanceData : public QObject
Q_OBJECT
public:
APMFirmwarePluginInstanceData(QObject* parent = NULL);
APMFirmwarePluginInstanceData(QObject* parent = nullptr);
bool textSeverityAdjustmentNeeded;
};
......
......@@ -16,10 +16,10 @@
APMFirmwarePluginFactory APMFirmwarePluginFactory;
APMFirmwarePluginFactory::APMFirmwarePluginFactory(void)
: _arduCopterPluginInstance(NULL)
, _arduPlanePluginInstance(NULL)
, _arduRoverPluginInstance(NULL)
, _arduSubPluginInstance(NULL)
: _arduCopterPluginInstance(nullptr)
, _arduPlanePluginInstance(nullptr)
, _arduRoverPluginInstance(nullptr)
, _arduSubPluginInstance(nullptr)
{
}
......@@ -74,5 +74,5 @@ FirmwarePlugin* APMFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPIL
}
}
return NULL;
return nullptr;