mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 13:30:34 +08:00
do not check pointer validity before deleting
Deleting a nullptr has no effect (this addresses a clang-tidy error)
This commit is contained in:
committed by
Mathieu Bresciani
parent
b8577c753f
commit
2ad25570ee
@@ -69,9 +69,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_buffer != nullptr) {
|
||||
delete[] _buffer;
|
||||
}
|
||||
delete[] _buffer;
|
||||
|
||||
_buffer = new data_type[size] {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user