mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 15:10:35 +08:00
clang-tidy modernize-use-nullptr
This commit is contained in:
@@ -86,7 +86,7 @@ void
|
||||
RingBuffer::flush()
|
||||
{
|
||||
while (!empty()) {
|
||||
get(NULL);
|
||||
get(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ RingBuffer::force(const void *val, size_t val_size)
|
||||
break;
|
||||
}
|
||||
|
||||
get(NULL);
|
||||
get(nullptr);
|
||||
overwrote = true;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ RingBuffer::get(void *val, size_t val_size)
|
||||
next = _next(candidate);
|
||||
|
||||
/* go ahead and read from this index */
|
||||
if (val != NULL) {
|
||||
if (val != nullptr) {
|
||||
memcpy(val, &_buf[candidate * _item_size], val_size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user