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:
Pavel Kirienko
2016-07-29 15:39:24 +03:00
parent b6fa34fed5
commit 38a241a90a
69 changed files with 306 additions and 274 deletions
@@ -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;
}