mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 06:53:35 +08:00
clang-tidy modernize-use-nullptr
This commit is contained in:
@@ -177,7 +177,7 @@ int attitude_estimator_ekf_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 5,
|
||||
7000,
|
||||
attitude_estimator_ekf_thread_main,
|
||||
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
|
||||
(argv) ? (char * const *)&argv[2] : (char * const *)nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ AttitudePositionEstimatorEKF *g_estimator = nullptr;
|
||||
}
|
||||
|
||||
AttitudePositionEstimatorEKF::AttitudePositionEstimatorEKF() :
|
||||
SuperBlock(NULL, "PE"),
|
||||
SuperBlock(nullptr, "PE"),
|
||||
_task_should_exit(false),
|
||||
_task_running(false),
|
||||
_estimator_task(-1),
|
||||
@@ -396,7 +396,7 @@ int AttitudePositionEstimatorEKF::check_filter_state()
|
||||
|
||||
int check = _ekf->CheckAndBound(&ekf_report);
|
||||
|
||||
const char *const feedback[] = { 0,
|
||||
const char *const feedback[] = { nullptr,
|
||||
"NaN in states, resetting",
|
||||
"stale sensor data, resetting",
|
||||
"got initial position lock",
|
||||
@@ -1721,7 +1721,7 @@ int ekf_att_pos_estimator_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "debug")) {
|
||||
int debug = strtoul(argv[2], NULL, 10);
|
||||
int debug = strtoul(argv[2], nullptr, 10);
|
||||
int ret = estimator::g_estimator->set_debuglevel(debug);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -462,7 +462,7 @@ int ex_fixedwing_control_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 20,
|
||||
2048,
|
||||
fixedwing_control_thread_main,
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)NULL);
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)nullptr);
|
||||
thread_running = true;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ int mc_att_control_m_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 5,
|
||||
1900,
|
||||
mc_att_control_start_main,
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)NULL);
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ int mc_pos_control_m_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 5,
|
||||
2500,
|
||||
mc_pos_control_start_main,
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)NULL);
|
||||
(argv) ? (char *const *)&argv[2] : (char *const *)nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user