Commit 3e7b3655 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

duchain: add some explicit default destructors to meet rule-of-three

parent 43ece7f7
......@@ -35,6 +35,7 @@ public:
, m_aliasedDeclaration(rhs.m_aliasedDeclaration)
{
}
~AliasDeclarationData() = default;
AliasDeclarationData& operator=(const AliasDeclarationData& rhs) = delete;
IndexedDeclaration m_aliasedDeclaration;
......
......@@ -129,6 +129,8 @@ public:
d = rhs->weakPointer();
}
~DUChainPointer() = default;
bool operator ==(const DUChainPointer<Type>& rhs) const
{
return d.data() == rhs.d.data();
......
......@@ -35,6 +35,7 @@ public:
: DeclarationData(rhs)
{
}
~ForwardDeclarationData() = default;
ForwardDeclarationData& operator=(const ForwardDeclarationData& rhs) = delete;
};
/**
......
......@@ -33,6 +33,7 @@ public:
, m_importIdentifier(rhs.m_importIdentifier)
{
}
~NamespaceAliasDeclarationData() = default;
NamespaceAliasDeclarationData& operator=(const NamespaceAliasDeclarationData& rhs) = delete;
IndexedQualifiedIdentifier m_importIdentifier; //The identifier that was imported
};
......
......@@ -43,6 +43,8 @@ public:
: KDevelop::StructureTypeData(rhs)
, m_contentType() { }
~ListTypeData() = default;
ListTypeData& operator=(const ListTypeData& rhs) = delete;
IndexedType m_contentType;
......@@ -162,6 +164,8 @@ public:
: ListTypeData(rhs)
, m_keyType() { }
~MapTypeData() = default;
MapTypeData& operator=(const ListTypeData& rhs) = delete;
IndexedType m_keyType;
......
......@@ -111,6 +111,7 @@ public:
/// Copy constructor. \param rhs data to copy
IntegralTypeData(const IntegralTypeData& rhs);
IntegralTypeData& operator=(const IntegralTypeData& rhs) = delete;
~IntegralTypeData() = default;
/// Data type
uint m_dataType = IntegralType::TypeNone;
};
......@@ -124,6 +125,7 @@ public:
PointerTypeData();
/// Copy constructor. \param rhs data to copy
PointerTypeData(const PointerTypeData& rhs);
~PointerTypeData() = default;
PointerTypeData& operator=(const PointerTypeData& rhs) = delete;
/// Type of data at which the pointer points
IndexedType m_baseType;
......@@ -138,6 +140,7 @@ public:
ReferenceTypeData();
/// Copy constructor. \param rhs data to copy
ReferenceTypeData(const ReferenceTypeData& rhs);
~ReferenceTypeData() = default;
ReferenceTypeData& operator=(const ReferenceTypeData& rhs) = delete;
/// Type of data which is referenced
IndexedType m_baseType;
......@@ -190,6 +193,7 @@ public:
StructureTypeData();
/// Copy constructor. \param rhs data to copy
StructureTypeData(const StructureTypeData& rhs);
~StructureTypeData() = default;
/// Whether the type is closed yet
StructureTypeData& operator=(const StructureTypeData& rhs) = delete;
};
......@@ -203,6 +207,7 @@ public:
ArrayTypeData();
/// Copy constructor. \param rhs data to copy
ArrayTypeData(const ArrayTypeData& rhs);
~ArrayTypeData() = default;
ArrayTypeData& operator=(const ArrayTypeData& rhs) = delete;
/// Dimension of the array
int m_dimension = 0;
......@@ -219,6 +224,7 @@ public:
DelayedTypeData();
/// Copy constructor. \param rhs data to copy
DelayedTypeData(const DelayedTypeData& rhs);
~DelayedTypeData() = default;
DelayedTypeData& operator=(const DelayedTypeData& rhs) = delete;
/// Identifier of the delayed type
IndexedTypeIdentifier m_identifier;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment