diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-08 12:07:12 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-08 12:07:27 +0300 |
commit | 19dfb6ea1f6745c0dbc2ce21839c30184b553878 (patch) | |
tree | 4deac8e505cf2f422ab20d132395d006dddb29c3 /source/blender/blenkernel | |
parent | 0ea66039dd5374e23e9e60e8e3192f919d4f1abd (diff) |
Cleanup: enable modernize-use-equals-default check
This removes a lot of unnecessary code that is generated by
the compiler automatically.
In very few cases, a defaulted destructor in a .cc file is
still necessary, because of forward declarations in the header.
I removed some defaulted virtual destructors, because they are not
necessary, when the parent class has a virtual destructor already.
Defaulted constructors are only necessary when there is another
constructor, but the class should still be default constructible.
Differential Revision: https://developer.blender.org/D10911
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cryptomatte.cc | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/geometry_set.cc | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/volume.cc | 4 |
4 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 4454669b59a..ab126ecb152 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -135,7 +135,7 @@ class GeometryComponent { public: GeometryComponent(GeometryComponentType type); - virtual ~GeometryComponent(); + virtual ~GeometryComponent() = default; static GeometryComponent *create(GeometryComponentType component_type); /* The returned component should be of the same type as the type this is called on. */ diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index 99f0342e223..1ff0ca92306 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -54,7 +54,7 @@ struct CryptomatteSession { /* Layer names in order of creation. */ blender::Vector<std::string> layer_names; - CryptomatteSession(); + CryptomatteSession() = default; CryptomatteSession(const Main *bmain); CryptomatteSession(StampData *stamp_data); CryptomatteSession(const Scene *scene); @@ -67,10 +67,6 @@ struct CryptomatteSession { #endif }; -CryptomatteSession::CryptomatteSession() -{ -} - CryptomatteSession::CryptomatteSession(const Main *bmain) { if (!BLI_listbase_is_empty(&bmain->objects)) { diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc index 281512fe323..3b027c05f39 100644 --- a/source/blender/blenkernel/intern/geometry_set.cc +++ b/source/blender/blenkernel/intern/geometry_set.cc @@ -49,10 +49,6 @@ GeometryComponent::GeometryComponent(GeometryComponentType type) : type_(type) { } -GeometryComponent ::~GeometryComponent() -{ -} - GeometryComponent *GeometryComponent::create(GeometryComponentType component_type) { switch (component_type) { diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 9b5231f7d6f..6c0d361a64c 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -171,10 +171,6 @@ static struct VolumeFileCache { }; /* Cache */ - VolumeFileCache() - { - } - ~VolumeFileCache() { BLI_assert(cache.empty()); |