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
@@ -60,13 +60,13 @@ class UAVCAN_EXPORT LazyConstructor
public:
LazyConstructor()
: ptr_(NULL)
: ptr_(UAVCAN_NULLPTR)
{
fill(data_.pool, data_.pool + sizeof(T), uint8_t(0));
}
LazyConstructor(const LazyConstructor<T>& rhs) // Implicit
: ptr_(NULL)
: ptr_(UAVCAN_NULLPTR)
{
fill(data_.pool, data_.pool + sizeof(T), uint8_t(0));
if (rhs)
@@ -87,7 +87,7 @@ public:
return *this;
}
bool isConstructed() const { return ptr_ != NULL; }
bool isConstructed() const { return ptr_ != UAVCAN_NULLPTR; }
operator T*() const { return ptr_; }
@@ -103,7 +103,7 @@ public:
{
ptr_->~T();
}
ptr_ = NULL;
ptr_ = UAVCAN_NULLPTR;
fill(data_.pool, data_.pool + sizeof(T), uint8_t(0));
}