mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 12:13:34 +08:00
Added -Wzero-as-null-pointer-constant, replaced NULL --> UAVCAN_NULLPTR. All changes are automatic, no manual edits to the library code.
This commit is contained in:
@@ -90,7 +90,7 @@ class UAVCAN_EXPORT ParamServer
|
||||
|
||||
void handleGetSet(const protocol::param::GetSet::Request& in, protocol::param::GetSet::Response& out)
|
||||
{
|
||||
UAVCAN_ASSERT(manager_ != NULL);
|
||||
UAVCAN_ASSERT(manager_ != UAVCAN_NULLPTR);
|
||||
|
||||
// Recover the name from index
|
||||
if (in.name.empty())
|
||||
@@ -131,7 +131,7 @@ class UAVCAN_EXPORT ParamServer
|
||||
void handleExecuteOpcode(const protocol::param::ExecuteOpcode::Request& in,
|
||||
protocol::param::ExecuteOpcode::Response& out)
|
||||
{
|
||||
UAVCAN_ASSERT(manager_ != NULL);
|
||||
UAVCAN_ASSERT(manager_ != UAVCAN_NULLPTR);
|
||||
|
||||
if (in.opcode == protocol::param::ExecuteOpcode::Request::OPCODE_SAVE)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
explicit ParamServer(INode& node)
|
||||
: get_set_srv_(node)
|
||||
, save_erase_srv_(node)
|
||||
, manager_(NULL)
|
||||
, manager_(UAVCAN_NULLPTR)
|
||||
{ }
|
||||
|
||||
/**
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
*/
|
||||
int start(IParamManager* manager)
|
||||
{
|
||||
if (manager == NULL)
|
||||
if (manager == UAVCAN_NULLPTR)
|
||||
{
|
||||
return -ErrInvalidParam;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user