-Wold-style-cast; linked list items made noncopyable

This commit is contained in:
Pavel Kirienko
2016-07-29 16:46:57 +03:00
parent 32d8851dde
commit c9ec822244
12 changed files with 48 additions and 32 deletions
@@ -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)
+1 -1
View File
@@ -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_;