mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
GDTR list integrity check (debug builds only)
This commit is contained in:
parent
b7b53630d1
commit
5cd0aff0d3
@ -95,9 +95,20 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::registImpl(Entry* d
|
||||
p = p->getNextListNode();
|
||||
}
|
||||
}
|
||||
#if UAVCAN_DEBUG
|
||||
const unsigned len_before = list->getLength();
|
||||
#endif
|
||||
list->insertBefore(dtd, EntryInsertionComparator(dtd));
|
||||
|
||||
#if UAVCAN_DEBUG
|
||||
{ // List integrity check
|
||||
const unsigned len_after = list->getLength();
|
||||
if (len_before >= len_after)
|
||||
{
|
||||
assert(0);
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
{ // Order check
|
||||
Entry* p = list->get();
|
||||
int id = -1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user