Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete all the non-virtual default destructors #717

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/podio/CollectionBufferFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class CollectionBufferFactory {
CollectionBufferFactory& operator=(CollectionBufferFactory const&) = delete;
CollectionBufferFactory(CollectionBufferFactory&&) = delete;
CollectionBufferFactory& operator=(CollectionBufferFactory&&) = delete;
~CollectionBufferFactory() = default;

/// Mutable instance only used for the initial registration of functions
/// during library loading
Expand Down
1 change: 0 additions & 1 deletion include/podio/CollectionIDTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class CollectionIDTable {

public:
CollectionIDTable();
~CollectionIDTable() = default;

CollectionIDTable(const CollectionIDTable&) = delete;
CollectionIDTable& operator=(const CollectionIDTable&) = delete;
Expand Down
1 change: 0 additions & 1 deletion include/podio/DatamodelRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class DatamodelRegistry {
// Mutable instance only used for the initial registration!
static DatamodelRegistry& mutInstance();

~DatamodelRegistry() = default;
DatamodelRegistry(const DatamodelRegistry&) = delete;
DatamodelRegistry& operator=(const DatamodelRegistry&) = delete;
DatamodelRegistry(DatamodelRegistry&&) = delete;
Expand Down
8 changes: 0 additions & 8 deletions include/podio/Frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class Frame {
struct FrameModel final : FrameConcept, public ICollectionProvider {

FrameModel(std::unique_ptr<FrameDataT> data);
~FrameModel() = default;
FrameModel(const FrameModel&) = delete;
FrameModel& operator=(const FrameModel&) = delete;
FrameModel(FrameModel&&) = default;
Expand Down Expand Up @@ -179,13 +178,6 @@ class Frame {
/// Frame move assignment operator
Frame& operator=(Frame&&) = default;

/// Frame destructor
///
/// @note Since the Frame owns all the collections that have been put into it,
/// or that can be obtained from it, this invalidates all references to these
/// collections.
~Frame() = default;

/// Get a collection from the Frame by name.
///
/// @tparam CollT The type of the desired collection
Expand Down
2 changes: 0 additions & 2 deletions include/podio/GenericParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ class GenericParameters {
GenericParameters(GenericParameters&&) = default;
GenericParameters& operator=(GenericParameters&&) = default;

~GenericParameters() = default;

template <typename T>
std::optional<T> get(const std::string& key) const;

Expand Down
1 change: 0 additions & 1 deletion include/podio/LinkNavigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class LinkNavigator {
LinkNavigator& operator=(const LinkNavigator&) = default;
LinkNavigator(LinkNavigator&&) = default;
LinkNavigator& operator=(LinkNavigator&&) = default;
~LinkNavigator() = default;

/// Get all the *From* objects and weights that have links with the passed
/// object
Expand Down
2 changes: 0 additions & 2 deletions include/podio/RNTupleReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class RNTupleReader {
public:
/// Create a RNTupleReader
RNTupleReader() = default;
/// Destructor
~RNTupleReader() = default;
/// The RNTupleReader is not copy-able
RNTupleReader(const RNTupleReader&) = delete;
/// The RNTupleReader is not copy-able
Expand Down
3 changes: 0 additions & 3 deletions include/podio/ROOTLegacyReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class ROOTLegacyReader {
public:
/// Create a SIOLegacyReader
ROOTLegacyReader() = default;
/// Destructor
~ROOTLegacyReader() = default;

/// The SIOLegacyReader is not copy-able
ROOTLegacyReader(const ROOTLegacyReader&) = delete;
/// The SIOLegacyReader is not copy-able
Expand Down
3 changes: 0 additions & 3 deletions include/podio/ROOTReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ class ROOTReader {
public:
/// Create a ROOTReader
ROOTReader() = default;
/// Destructor
~ROOTReader() = default;

/// The ROOTReader is not copy-able
ROOTReader(const ROOTReader&) = delete;
/// The ROOTReader is not copy-able
Expand Down
3 changes: 0 additions & 3 deletions include/podio/Reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class Reader {
ReaderModel(ReaderModel&&) = default;
ReaderModel& operator=(ReaderModel&&) = default;

~ReaderModel() = default;

podio::Frame readNextFrame(const std::string& name) override {
auto maybeFrame = m_reader->readNextEntry(name);
if (maybeFrame) {
Expand Down Expand Up @@ -100,7 +98,6 @@ class Reader {
Reader& operator=(const Reader&) = delete;
Reader(Reader&&) = default;
Reader& operator=(Reader&&) = default;
~Reader() = default;

/// Read the next frame of a given category
///
Expand Down
3 changes: 0 additions & 3 deletions include/podio/SIOLegacyReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class SIOLegacyReader {
public:
/// Create a SIOLegacyReader
SIOLegacyReader();
/// Destructor
~SIOLegacyReader() = default;

/// The SIOLegacyReader is not copy-able
SIOLegacyReader(const SIOLegacyReader&) = delete;
/// The SIOLegacyReader is not copy-able
Expand Down
3 changes: 0 additions & 3 deletions include/podio/SIOReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class SIOReader {
public:
/// Create an SIOReader
SIOReader();
/// SIOReader destructor
~SIOReader() = default;

/// The SIOReader is not copy-able
SIOReader(const SIOReader&) = delete;
/// The SIOReader is not copy-able
Expand Down
1 change: 0 additions & 1 deletion include/podio/SchemaEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class SchemaEvolution {
SchemaEvolution& operator=(const SchemaEvolution&) = delete;
SchemaEvolution(SchemaEvolution&&) = delete;
SchemaEvolution& operator=(SchemaEvolution&&) = delete;
~SchemaEvolution() = default;

/// Mutable instance only used for the initial registration of functions
/// during library loading
Expand Down
1 change: 0 additions & 1 deletion include/podio/UserDataCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class UserDataCollection : public CollectionBase {
UserDataCollection& operator=(const UserDataCollection&) = delete;
UserDataCollection(UserDataCollection&&) = default;
UserDataCollection& operator=(UserDataCollection&&) = default;
~UserDataCollection() = default;

/// The schema version of UserDataCollections
static constexpr SchemaVersionT schemaVersion = 1;
Expand Down
8 changes: 0 additions & 8 deletions include/podio/Writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class Writer {
WriterModel(WriterModel&&) = default;
WriterModel& operator=(WriterModel&&) = default;

~WriterModel() = default;

void writeFrame(const podio::Frame& frame, const std::string& category,
const std::vector<std::string>& collections) override {
return m_writer->writeFrame(frame, category, collections);
Expand All @@ -66,12 +64,6 @@ class Writer {
Writer(Writer&&) = default;
Writer& operator=(Writer&&) = default;

/// Destructor
///
/// This also takes care of writing all the necessary metadata to read files
/// back again.
~Writer() = default;

/// Store the given frame with the given category
///
/// This stores all available categories from the passed frame
Expand Down
3 changes: 0 additions & 3 deletions include/podio/detail/Link.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ class LinkT {
return {nullptr};
}

/// Destructor
~LinkT() = default;

/// Get the weight of the link
float getWeight() const {
return m_obj->data.weight;
Expand Down
1 change: 0 additions & 1 deletion include/podio/detail/LinkCollectionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class LinkCollectionData {
LinkCollectionData& operator=(const LinkCollectionData&) = delete;
LinkCollectionData(LinkCollectionData&&) = default;
LinkCollectionData& operator=(LinkCollectionData&&) = default;
~LinkCollectionData() = default;

podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl) {
return {isSubsetColl ? nullptr : (void*)&m_data, (void*)m_data.get(), &m_refCollections, &m_vecInfo};
Expand Down
3 changes: 0 additions & 3 deletions include/podio/detail/LinkObj.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ class LinkObj {
/// No assignment operator
LinkObj& operator=(const LinkObj&) = delete;

/// Destructor
~LinkObj() = default;

public:
podio::ObjectID id{};
LinkData data{1.0f};
Expand Down
1 change: 0 additions & 1 deletion include/podio/utilities/DatamodelRegistryIOHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class DatamodelDefinitionHolder {
}

DatamodelDefinitionHolder() = default;
~DatamodelDefinitionHolder() = default;
DatamodelDefinitionHolder(const DatamodelDefinitionHolder&) = delete;
DatamodelDefinitionHolder& operator=(const DatamodelDefinitionHolder&) = delete;
DatamodelDefinitionHolder(DatamodelDefinitionHolder&&) = default;
Expand Down
2 changes: 0 additions & 2 deletions include/podio/utilities/RootHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ namespace root_utils {
/// get them from a TTree/TChain for every event.
struct CollectionBranches {
CollectionBranches() = default;
~CollectionBranches() = default;
CollectionBranches(const CollectionBranches&) = delete;
CollectionBranches& operator=(const CollectionBranches&) = delete;
CollectionBranches(CollectionBranches&&) = default;
Expand All @@ -51,7 +50,6 @@ namespace root_utils {
template <typename T>
struct ParamStorage {
ParamStorage() = default;
~ParamStorage() = default;
ParamStorage(const ParamStorage&) = delete;
ParamStorage& operator=(const ParamStorage&) = delete;
ParamStorage(ParamStorage&&) = default;
Expand Down
5 changes: 0 additions & 5 deletions python/templates/CollectionData.h.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ public:
{{ class_type }}({{ class_type }}&& other) = default;
{{ class_type }}& operator=({{ class_type }}&& other) = default;

/**
* Destructor
*/
~{{ class_type }}() = default;

void clear(bool isSubsetColl);

podio::CollectionWriteBuffers getCollectionBuffers(bool isSubsetColl);
Expand Down
2 changes: 0 additions & 2 deletions python/templates/Interface.h.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ private:

template<typename ValueT>
struct Model final : Concept {
~Model() = default;
Model(ValueT value) : m_value(value) {}

std::unique_ptr<Concept> clone() const final {
Expand Down Expand Up @@ -115,7 +114,6 @@ public:
return *this;
}

~{{ class.bare_type }}() = default;
{{ class.bare_type }}({{ class.bare_type }}&&) = default;
{{ class.bare_type }}& operator=({{ class.bare_type }}&&) = default;

Expand Down
3 changes: 0 additions & 3 deletions python/templates/macros/declarations.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
/// create a mutable deep-copy of the object with identical relations
/// if cloneRelations=false, the relations are not cloned and will be empty
Mutable{{ type }} clone(bool cloneRelations=true) const;

/// destructor
~{{ full_type }}() = default;
{% endmacro %}


Expand Down
Loading