Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-04-08 12:07:12 +0300
committerJacques Lucke <jacques@blender.org>2021-04-08 12:07:27 +0300
commit19dfb6ea1f6745c0dbc2ce21839c30184b553878 (patch)
tree4deac8e505cf2f422ab20d132395d006dddb29c3 /source/blender/io/common
parent0ea66039dd5374e23e9e60e8e3192f919d4f1abd (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/io/common')
-rw-r--r--source/blender/io/common/IO_abstract_hierarchy_iterator.h5
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator.cc4
-rw-r--r--source/blender/io/common/intern/dupli_parent_finder.cc8
-rw-r--r--source/blender/io/common/intern/dupli_parent_finder.hh3
-rw-r--r--source/blender/io/common/intern/object_identifier.cc9
5 files changed, 1 insertions, 28 deletions
diff --git a/source/blender/io/common/IO_abstract_hierarchy_iterator.h b/source/blender/io/common/IO_abstract_hierarchy_iterator.h
index 300c555ac8f..0bebc4384a9 100644
--- a/source/blender/io/common/IO_abstract_hierarchy_iterator.h
+++ b/source/blender/io/common/IO_abstract_hierarchy_iterator.h
@@ -123,7 +123,7 @@ struct HierarchyContext {
*/
class AbstractHierarchyWriter {
public:
- virtual ~AbstractHierarchyWriter();
+ virtual ~AbstractHierarchyWriter() = default;
virtual void write(HierarchyContext &context) = 0;
/* TODO(Sybren): add function like absent() that's called when a writer was previously created,
* but wasn't used while exporting the current frame (for example, a particle-instanced mesh of
@@ -186,9 +186,6 @@ class ObjectIdentifier {
ObjectIdentifier(Object *object, Object *duplicated_by, const PersistentID &persistent_id);
public:
- ObjectIdentifier(const ObjectIdentifier &other);
- ~ObjectIdentifier();
-
static ObjectIdentifier for_graph_root();
static ObjectIdentifier for_real_object(Object *object);
static ObjectIdentifier for_hierarchy_context(const HierarchyContext *context);
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
index a33d636500f..3cda4d125d0 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
@@ -137,10 +137,6 @@ AbstractHierarchyWriter *EnsuredWriter::operator->()
return writer_;
}
-AbstractHierarchyWriter::~AbstractHierarchyWriter()
-{
-}
-
bool AbstractHierarchyWriter::check_is_animated(const HierarchyContext &context) const
{
const Object *object = context.object;
diff --git a/source/blender/io/common/intern/dupli_parent_finder.cc b/source/blender/io/common/intern/dupli_parent_finder.cc
index 73e33eff164..221e70ed587 100644
--- a/source/blender/io/common/intern/dupli_parent_finder.cc
+++ b/source/blender/io/common/intern/dupli_parent_finder.cc
@@ -25,14 +25,6 @@
namespace blender::io {
-DupliParentFinder::DupliParentFinder()
-{
-}
-
-DupliParentFinder::~DupliParentFinder()
-{
-}
-
void DupliParentFinder::insert(const DupliObject *dupli_ob)
{
dupli_set_.insert(dupli_ob->ob);
diff --git a/source/blender/io/common/intern/dupli_parent_finder.hh b/source/blender/io/common/intern/dupli_parent_finder.hh
index 3dcf037bb5e..b7632a72222 100644
--- a/source/blender/io/common/intern/dupli_parent_finder.hh
+++ b/source/blender/io/common/intern/dupli_parent_finder.hh
@@ -43,9 +43,6 @@ class DupliParentFinder final {
InstancerPIDToDuplisMap instancer_pid_to_duplis_;
public:
- DupliParentFinder();
- ~DupliParentFinder();
-
void insert(const DupliObject *dupli_ob);
bool is_duplicated(const Object *object) const;
diff --git a/source/blender/io/common/intern/object_identifier.cc b/source/blender/io/common/intern/object_identifier.cc
index 5d0b89b0630..2df1befcd69 100644
--- a/source/blender/io/common/intern/object_identifier.cc
+++ b/source/blender/io/common/intern/object_identifier.cc
@@ -35,15 +35,6 @@ ObjectIdentifier::ObjectIdentifier(Object *object,
{
}
-ObjectIdentifier::ObjectIdentifier(const ObjectIdentifier &other)
- : object(other.object), duplicated_by(other.duplicated_by), persistent_id(other.persistent_id)
-{
-}
-
-ObjectIdentifier::~ObjectIdentifier()
-{
-}
-
ObjectIdentifier ObjectIdentifier::for_real_object(Object *object)
{
return ObjectIdentifier(object, nullptr, PersistentID());