mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:23:33 +08:00
-Wold-style-cast; linked list items made noncopyable
This commit is contained in:
@@ -211,7 +211,9 @@ GlobalDataTypeRegistry::RegistrationResult GlobalDataTypeRegistry::registerDataT
|
||||
{
|
||||
return RegistrationResultFrozen;
|
||||
}
|
||||
|
||||
static Entry entry;
|
||||
|
||||
{
|
||||
const RegistrationResult remove_res = remove(&entry);
|
||||
if (remove_res != RegistrationResultOk)
|
||||
@@ -219,7 +221,11 @@ GlobalDataTypeRegistry::RegistrationResult GlobalDataTypeRegistry::registerDataT
|
||||
return remove_res;
|
||||
}
|
||||
}
|
||||
entry = Entry(DataTypeKind(Type::DataTypeKind), id, Type::getDataTypeSignature(), Type::getDataTypeFullName());
|
||||
|
||||
// We can't just overwrite the entry itself because it's noncopyable
|
||||
entry.descriptor = DataTypeDescriptor(DataTypeKind(Type::DataTypeKind), id,
|
||||
Type::getDataTypeSignature(), Type::getDataTypeFullName());
|
||||
|
||||
{
|
||||
const RegistrationResult remove_res = remove(&entry);
|
||||
if (remove_res != RegistrationResultOk)
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace uavcan
|
||||
|
||||
class UAVCAN_EXPORT Scheduler;
|
||||
|
||||
class UAVCAN_EXPORT DeadlineHandler : public LinkedListNode<DeadlineHandler>, Noncopyable
|
||||
class UAVCAN_EXPORT DeadlineHandler : public LinkedListNode<DeadlineHandler>
|
||||
{
|
||||
MonotonicTime deadline_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user