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
This commit is contained in:
Jacques Lucke 2021-04-08 11:07:12 +02:00
parent 0ea66039dd
commit 19dfb6ea1f
64 changed files with 14 additions and 419 deletions

View File

@ -35,7 +35,6 @@ Checks: >
-modernize-use-auto, -modernize-use-auto,
-modernize-use-trailing-return-type, -modernize-use-trailing-return-type,
-modernize-avoid-c-arrays, -modernize-avoid-c-arrays,
-modernize-use-equals-default,
-modernize-use-nodiscard, -modernize-use-nodiscard,
-modernize-loop-convert, -modernize-loop-convert,
-modernize-pass-by-value, -modernize-pass-by-value,

View File

@ -135,7 +135,7 @@ class GeometryComponent {
public: public:
GeometryComponent(GeometryComponentType type); GeometryComponent(GeometryComponentType type);
virtual ~GeometryComponent(); virtual ~GeometryComponent() = default;
static GeometryComponent *create(GeometryComponentType component_type); static GeometryComponent *create(GeometryComponentType component_type);
/* The returned component should be of the same type as the type this is called on. */ /* The returned component should be of the same type as the type this is called on. */

View File

@ -54,7 +54,7 @@ struct CryptomatteSession {
/* Layer names in order of creation. */ /* Layer names in order of creation. */
blender::Vector<std::string> layer_names; blender::Vector<std::string> layer_names;
CryptomatteSession(); CryptomatteSession() = default;
CryptomatteSession(const Main *bmain); CryptomatteSession(const Main *bmain);
CryptomatteSession(StampData *stamp_data); CryptomatteSession(StampData *stamp_data);
CryptomatteSession(const Scene *scene); CryptomatteSession(const Scene *scene);
@ -67,10 +67,6 @@ struct CryptomatteSession {
#endif #endif
}; };
CryptomatteSession::CryptomatteSession()
{
}
CryptomatteSession::CryptomatteSession(const Main *bmain) CryptomatteSession::CryptomatteSession(const Main *bmain)
{ {
if (!BLI_listbase_is_empty(&bmain->objects)) { if (!BLI_listbase_is_empty(&bmain->objects)) {

View File

@ -49,10 +49,6 @@ GeometryComponent::GeometryComponent(GeometryComponentType type) : type_(type)
{ {
} }
GeometryComponent ::~GeometryComponent()
{
}
GeometryComponent *GeometryComponent::create(GeometryComponentType component_type) GeometryComponent *GeometryComponent::create(GeometryComponentType component_type)
{ {
switch (component_type) { switch (component_type) {

View File

@ -171,10 +171,6 @@ static struct VolumeFileCache {
}; };
/* Cache */ /* Cache */
VolumeFileCache()
{
}
~VolumeFileCache() ~VolumeFileCache()
{ {
BLI_assert(cache.empty()); BLI_assert(cache.empty());

View File

@ -334,9 +334,6 @@ template<typename T> class CDT_state {
T epsilon; T epsilon;
explicit CDT_state(int num_input_verts, int num_input_edges, int num_input_faces, T epsilon); explicit CDT_state(int num_input_verts, int num_input_edges, int num_input_faces, T epsilon);
~CDT_state()
{
}
}; };
template<typename T> CDTArrangement<T>::~CDTArrangement() template<typename T> CDTArrangement<T>::~CDTArrangement()

View File

@ -527,9 +527,7 @@ IMeshArena::IMeshArena()
pimpl_ = std::make_unique<IMeshArenaImpl>(); pimpl_ = std::make_unique<IMeshArenaImpl>();
} }
IMeshArena::~IMeshArena() IMeshArena::~IMeshArena() = default;
{
}
void IMeshArena::reserve(int vert_num_hint, int face_num_hint) void IMeshArena::reserve(int vert_num_hint, int face_num_hint)
{ {
@ -753,27 +751,6 @@ struct BoundingBox {
BoundingBox(const float3 &min, const float3 &max) : min(min), max(max) BoundingBox(const float3 &min, const float3 &max) : min(min), max(max)
{ {
} }
BoundingBox(const BoundingBox &other) : min(other.min), max(other.max)
{
}
BoundingBox(BoundingBox &&other) noexcept : min(std::move(other.min)), max(std::move(other.max))
{
}
~BoundingBox() = default;
BoundingBox operator=(const BoundingBox &other)
{
if (this != &other) {
min = other.min;
max = other.max;
}
return *this;
}
BoundingBox operator=(BoundingBox &&other) noexcept
{
min = std::move(other.min);
max = std::move(other.max);
return *this;
}
void combine(const float3 &p) void combine(const float3 &p)
{ {
@ -936,28 +913,6 @@ class CoplanarCluster {
{ {
this->add_tri(t, bb); this->add_tri(t, bb);
} }
CoplanarCluster(const CoplanarCluster &other) : tris_(other.tris_), bb_(other.bb_)
{
}
CoplanarCluster(CoplanarCluster &&other) noexcept
: tris_(std::move(other.tris_)), bb_(std::move(other.bb_))
{
}
~CoplanarCluster() = default;
CoplanarCluster &operator=(const CoplanarCluster &other)
{
if (this != &other) {
tris_ = other.tris_;
bb_ = other.bb_;
}
return *this;
}
CoplanarCluster &operator=(CoplanarCluster &&other) noexcept
{
tris_ = std::move(other.tris_);
bb_ = std::move(other.bb_);
return *this;
}
/* Assume that caller knows this will not be a duplicate. */ /* Assume that caller knows this will not be a duplicate. */
void add_tri(int t, const BoundingBox &bb) void add_tri(int t, const BoundingBox &bb)
@ -1073,38 +1028,6 @@ struct ITT_value {
ITT_value(ITT_value_kind k, const mpq3 &p1, const mpq3 &p2) : p1(p1), p2(p2), kind(k) ITT_value(ITT_value_kind k, const mpq3 &p1, const mpq3 &p2) : p1(p1), p2(p2), kind(k)
{ {
} }
ITT_value(const ITT_value &other)
: p1(other.p1), p2(other.p2), t_source(other.t_source), kind(other.kind)
{
}
ITT_value(ITT_value &&other) noexcept
: p1(std::move(other.p1)),
p2(std::move(other.p2)),
t_source(other.t_source),
kind(other.kind)
{
}
~ITT_value()
{
}
ITT_value &operator=(const ITT_value &other)
{
if (this != &other) {
kind = other.kind;
p1 = other.p1;
p2 = other.p2;
t_source = other.t_source;
}
return *this;
}
ITT_value &operator=(ITT_value &&other) noexcept
{
kind = other.kind;
p1 = std::move(other.p1);
p2 = std::move(other.p2);
t_source = other.t_source;
return *this;
}
}; };
static std::ostream &operator<<(std::ostream &os, const ITT_value &itt); static std::ostream &operator<<(std::ostream &os, const ITT_value &itt);

View File

@ -147,10 +147,6 @@ class TBBTaskGroup : public tbb::task_group {
} }
# endif # endif
} }
~TBBTaskGroup()
{
}
}; };
#endif #endif

View File

@ -50,10 +50,6 @@
#include "CLG_log.h" #include "CLG_log.h"
BlendfileLoadingBaseTest::~BlendfileLoadingBaseTest()
{
}
void BlendfileLoadingBaseTest::SetUpTestCase() void BlendfileLoadingBaseTest::SetUpTestCase()
{ {
testing::Test::SetUpTestCase(); testing::Test::SetUpTestCase();

View File

@ -30,8 +30,6 @@ class BlendfileLoadingBaseTest : public testing::Test {
struct Depsgraph *depsgraph = nullptr; struct Depsgraph *depsgraph = nullptr;
public: public:
virtual ~BlendfileLoadingBaseTest();
/* Sets up Blender just enough to not crash on loading /* Sets up Blender just enough to not crash on loading
* a blendfile and constructing a depsgraph. */ * a blendfile and constructing a depsgraph. */
static void SetUpTestCase(); static void SetUpTestCase();

View File

@ -39,10 +39,6 @@ namespace blender::compositor {
**** NodeGraph **** **** NodeGraph ****
*******************/ *******************/
NodeGraph::NodeGraph()
{
}
NodeGraph::~NodeGraph() NodeGraph::~NodeGraph()
{ {
while (m_nodes.size()) { while (m_nodes.size()) {

View File

@ -56,7 +56,6 @@ class NodeGraph {
Vector<Link> m_links; Vector<Link> m_links;
public: public:
NodeGraph();
~NodeGraph(); ~NodeGraph();
const Vector<Node *> &nodes() const const Vector<Node *> &nodes() const

View File

@ -46,10 +46,6 @@ NodeOperationBuilder::NodeOperationBuilder(const CompositorContext *context, bNo
m_graph.from_bNodeTree(*context, b_nodetree); m_graph.from_bNodeTree(*context, b_nodetree);
} }
NodeOperationBuilder::~NodeOperationBuilder()
{
}
void NodeOperationBuilder::convertToOperations(ExecutionSystem *system) void NodeOperationBuilder::convertToOperations(ExecutionSystem *system)
{ {
/* interface handle for nodes */ /* interface handle for nodes */

View File

@ -87,7 +87,6 @@ class NodeOperationBuilder {
public: public:
NodeOperationBuilder(const CompositorContext *context, bNodeTree *b_nodetree); NodeOperationBuilder(const CompositorContext *context, bNodeTree *b_nodetree);
~NodeOperationBuilder();
const CompositorContext &context() const const CompositorContext &context() const
{ {

View File

@ -20,11 +20,6 @@
namespace blender::compositor { namespace blender::compositor {
AlphaOverKeyOperation::AlphaOverKeyOperation()
{
/* pass */
}
void AlphaOverKeyOperation::executePixelSampled(float output[4], void AlphaOverKeyOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,

View File

@ -28,11 +28,6 @@ namespace blender::compositor {
*/ */
class AlphaOverKeyOperation : public MixBaseOperation { class AlphaOverKeyOperation : public MixBaseOperation {
public: public:
/**
* Default constructor
*/
AlphaOverKeyOperation();
/** /**
* The inner loop of this operation. * The inner loop of this operation.
*/ */

View File

@ -20,11 +20,6 @@
namespace blender::compositor { namespace blender::compositor {
AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation()
{
/* pass */
}
void AlphaOverPremultiplyOperation::executePixelSampled(float output[4], void AlphaOverPremultiplyOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,

View File

@ -28,11 +28,6 @@ namespace blender::compositor {
*/ */
class AlphaOverPremultiplyOperation : public MixBaseOperation { class AlphaOverPremultiplyOperation : public MixBaseOperation {
public: public:
/**
* Default constructor
*/
AlphaOverPremultiplyOperation();
/** /**
* The inner loop of this operation. * The inner loop of this operation.
*/ */

View File

@ -24,11 +24,6 @@
namespace blender::compositor { namespace blender::compositor {
CalculateStandardDeviationOperation::CalculateStandardDeviationOperation()
{
/* pass */
}
void CalculateStandardDeviationOperation::executePixel(float output[4], void CalculateStandardDeviationOperation::executePixel(float output[4],
int /*x*/, int /*x*/,
int /*y*/, int /*y*/,

View File

@ -34,8 +34,6 @@ class CalculateStandardDeviationOperation : public CalculateMeanOperation {
float m_standardDeviation; float m_standardDeviation;
public: public:
CalculateStandardDeviationOperation();
/** /**
* The inner loop of this operation. * The inner loop of this operation.
*/ */

View File

@ -21,11 +21,6 @@
namespace blender::compositor { namespace blender::compositor {
ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation()
{
/* pass */
}
void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/) void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/)
{ {
float in1[4], in2[4], res1[4] = {0.0}, res2[4] = {0.0}; float in1[4], in2[4], res1[4] = {0.0}, res2[4] = {0.0};

View File

@ -24,7 +24,6 @@ namespace blender::compositor {
class ConvolutionEdgeFilterOperation : public ConvolutionFilterOperation { class ConvolutionEdgeFilterOperation : public ConvolutionFilterOperation {
public: public:
ConvolutionEdgeFilterOperation();
void executePixel(float output[4], int x, int y, void *data) override; void executePixel(float output[4], int x, int y, void *data) override;
}; };

View File

@ -21,11 +21,6 @@
namespace blender::compositor { namespace blender::compositor {
DistanceYCCMatteOperation::DistanceYCCMatteOperation()
{
/* pass */
}
float DistanceYCCMatteOperation::calculateDistance(float key[4], float image[4]) float DistanceYCCMatteOperation::calculateDistance(float key[4], float image[4])
{ {
/* only measure the second 2 values */ /* only measure the second 2 values */

View File

@ -30,12 +30,6 @@ namespace blender::compositor {
class DistanceYCCMatteOperation : public DistanceRGBMatteOperation { class DistanceYCCMatteOperation : public DistanceRGBMatteOperation {
protected: protected:
float calculateDistance(float key[4], float image[4]) override; float calculateDistance(float key[4], float image[4]) override;
public:
/**
* Default constructor
*/
DistanceYCCMatteOperation();
}; };
} // namespace blender::compositor } // namespace blender::compositor

View File

@ -99,11 +99,6 @@ void MixBaseOperation::deinitExecution()
/* ******** Mix Add Operation ******** */ /* ******** Mix Add Operation ******** */
MixAddOperation::MixAddOperation()
{
/* pass */
}
void MixAddOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) void MixAddOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{ {
float inputColor1[4]; float inputColor1[4];
@ -128,11 +123,6 @@ void MixAddOperation::executePixelSampled(float output[4], float x, float y, Pix
/* ******** Mix Blend Operation ******** */ /* ******** Mix Blend Operation ******** */
MixBlendOperation::MixBlendOperation()
{
/* pass */
}
void MixBlendOperation::executePixelSampled(float output[4], void MixBlendOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -162,11 +152,6 @@ void MixBlendOperation::executePixelSampled(float output[4],
/* ******** Mix Burn Operation ******** */ /* ******** Mix Burn Operation ******** */
MixColorBurnOperation::MixColorBurnOperation()
{
/* pass */
}
void MixColorBurnOperation::executePixelSampled(float output[4], void MixColorBurnOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -245,11 +230,6 @@ void MixColorBurnOperation::executePixelSampled(float output[4],
/* ******** Mix Color Operation ******** */ /* ******** Mix Color Operation ******** */
MixColorOperation::MixColorOperation()
{
/* pass */
}
void MixColorOperation::executePixelSampled(float output[4], void MixColorOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -290,11 +270,6 @@ void MixColorOperation::executePixelSampled(float output[4],
/* ******** Mix Darken Operation ******** */ /* ******** Mix Darken Operation ******** */
MixDarkenOperation::MixDarkenOperation()
{
/* pass */
}
void MixDarkenOperation::executePixelSampled(float output[4], void MixDarkenOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -323,11 +298,6 @@ void MixDarkenOperation::executePixelSampled(float output[4],
/* ******** Mix Difference Operation ******** */ /* ******** Mix Difference Operation ******** */
MixDifferenceOperation::MixDifferenceOperation()
{
/* pass */
}
void MixDifferenceOperation::executePixelSampled(float output[4], void MixDifferenceOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -356,11 +326,6 @@ void MixDifferenceOperation::executePixelSampled(float output[4],
/* ******** Mix Difference Operation ******** */ /* ******** Mix Difference Operation ******** */
MixDivideOperation::MixDivideOperation()
{
/* pass */
}
void MixDivideOperation::executePixelSampled(float output[4], void MixDivideOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -406,11 +371,6 @@ void MixDivideOperation::executePixelSampled(float output[4],
/* ******** Mix Dodge Operation ******** */ /* ******** Mix Dodge Operation ******** */
MixDodgeOperation::MixDodgeOperation()
{
/* pass */
}
void MixDodgeOperation::executePixelSampled(float output[4], void MixDodgeOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -494,11 +454,6 @@ void MixDodgeOperation::executePixelSampled(float output[4],
/* ******** Mix Glare Operation ******** */ /* ******** Mix Glare Operation ******** */
MixGlareOperation::MixGlareOperation()
{
/* pass */
}
void MixGlareOperation::executePixelSampled(float output[4], void MixGlareOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -535,11 +490,6 @@ void MixGlareOperation::executePixelSampled(float output[4],
/* ******** Mix Hue Operation ******** */ /* ******** Mix Hue Operation ******** */
MixHueOperation::MixHueOperation()
{
/* pass */
}
void MixHueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) void MixHueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{ {
float inputColor1[4]; float inputColor1[4];
@ -577,11 +527,6 @@ void MixHueOperation::executePixelSampled(float output[4], float x, float y, Pix
/* ******** Mix Lighten Operation ******** */ /* ******** Mix Lighten Operation ******** */
MixLightenOperation::MixLightenOperation()
{
/* pass */
}
void MixLightenOperation::executePixelSampled(float output[4], void MixLightenOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -628,11 +573,6 @@ void MixLightenOperation::executePixelSampled(float output[4],
/* ******** Mix Linear Light Operation ******** */ /* ******** Mix Linear Light Operation ******** */
MixLinearLightOperation::MixLinearLightOperation()
{
/* pass */
}
void MixLinearLightOperation::executePixelSampled(float output[4], void MixLinearLightOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -676,11 +616,6 @@ void MixLinearLightOperation::executePixelSampled(float output[4],
/* ******** Mix Multiply Operation ******** */ /* ******** Mix Multiply Operation ******** */
MixMultiplyOperation::MixMultiplyOperation()
{
/* pass */
}
void MixMultiplyOperation::executePixelSampled(float output[4], void MixMultiplyOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -709,11 +644,6 @@ void MixMultiplyOperation::executePixelSampled(float output[4],
/* ******** Mix Overlay Operation ******** */ /* ******** Mix Overlay Operation ******** */
MixOverlayOperation::MixOverlayOperation()
{
/* pass */
}
void MixOverlayOperation::executePixelSampled(float output[4], void MixOverlayOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -759,11 +689,6 @@ void MixOverlayOperation::executePixelSampled(float output[4],
/* ******** Mix Saturation Operation ******** */ /* ******** Mix Saturation Operation ******** */
MixSaturationOperation::MixSaturationOperation()
{
/* pass */
}
void MixSaturationOperation::executePixelSampled(float output[4], void MixSaturationOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -801,11 +726,6 @@ void MixSaturationOperation::executePixelSampled(float output[4],
/* ******** Mix Screen Operation ******** */ /* ******** Mix Screen Operation ******** */
MixScreenOperation::MixScreenOperation()
{
/* pass */
}
void MixScreenOperation::executePixelSampled(float output[4], void MixScreenOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -835,11 +755,6 @@ void MixScreenOperation::executePixelSampled(float output[4],
/* ******** Mix Soft Light Operation ******** */ /* ******** Mix Soft Light Operation ******** */
MixSoftLightOperation::MixSoftLightOperation()
{
/* pass */
}
void MixSoftLightOperation::executePixelSampled(float output[4], void MixSoftLightOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -881,11 +796,6 @@ void MixSoftLightOperation::executePixelSampled(float output[4],
/* ******** Mix Subtract Operation ******** */ /* ******** Mix Subtract Operation ******** */
MixSubtractOperation::MixSubtractOperation()
{
/* pass */
}
void MixSubtractOperation::executePixelSampled(float output[4], void MixSubtractOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,
@ -913,11 +823,6 @@ void MixSubtractOperation::executePixelSampled(float output[4],
/* ******** Mix Value Operation ******** */ /* ******** Mix Value Operation ******** */
MixValueOperation::MixValueOperation()
{
/* pass */
}
void MixValueOperation::executePixelSampled(float output[4], void MixValueOperation::executePixelSampled(float output[4],
float x, float x,
float y, float y,

View File

@ -85,115 +85,96 @@ class MixBaseOperation : public NodeOperation {
class MixAddOperation : public MixBaseOperation { class MixAddOperation : public MixBaseOperation {
public: public:
MixAddOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixBlendOperation : public MixBaseOperation { class MixBlendOperation : public MixBaseOperation {
public: public:
MixBlendOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixColorBurnOperation : public MixBaseOperation { class MixColorBurnOperation : public MixBaseOperation {
public: public:
MixColorBurnOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixColorOperation : public MixBaseOperation { class MixColorOperation : public MixBaseOperation {
public: public:
MixColorOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixDarkenOperation : public MixBaseOperation { class MixDarkenOperation : public MixBaseOperation {
public: public:
MixDarkenOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixDifferenceOperation : public MixBaseOperation { class MixDifferenceOperation : public MixBaseOperation {
public: public:
MixDifferenceOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixDivideOperation : public MixBaseOperation { class MixDivideOperation : public MixBaseOperation {
public: public:
MixDivideOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixDodgeOperation : public MixBaseOperation { class MixDodgeOperation : public MixBaseOperation {
public: public:
MixDodgeOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixGlareOperation : public MixBaseOperation { class MixGlareOperation : public MixBaseOperation {
public: public:
MixGlareOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixHueOperation : public MixBaseOperation { class MixHueOperation : public MixBaseOperation {
public: public:
MixHueOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixLightenOperation : public MixBaseOperation { class MixLightenOperation : public MixBaseOperation {
public: public:
MixLightenOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixLinearLightOperation : public MixBaseOperation { class MixLinearLightOperation : public MixBaseOperation {
public: public:
MixLinearLightOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixMultiplyOperation : public MixBaseOperation { class MixMultiplyOperation : public MixBaseOperation {
public: public:
MixMultiplyOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixOverlayOperation : public MixBaseOperation { class MixOverlayOperation : public MixBaseOperation {
public: public:
MixOverlayOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixSaturationOperation : public MixBaseOperation { class MixSaturationOperation : public MixBaseOperation {
public: public:
MixSaturationOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixScreenOperation : public MixBaseOperation { class MixScreenOperation : public MixBaseOperation {
public: public:
MixScreenOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixSoftLightOperation : public MixBaseOperation { class MixSoftLightOperation : public MixBaseOperation {
public: public:
MixSoftLightOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixSubtractOperation : public MixBaseOperation { class MixSubtractOperation : public MixBaseOperation {
public: public:
MixSubtractOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };
class MixValueOperation : public MixBaseOperation { class MixValueOperation : public MixBaseOperation {
public: public:
MixValueOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
}; };

View File

@ -77,10 +77,6 @@ DepsgraphBuilder::DepsgraphBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuild
{ {
} }
DepsgraphBuilder::~DepsgraphBuilder()
{
}
bool DepsgraphBuilder::need_pull_base_into_graph(Base *base) bool DepsgraphBuilder::need_pull_base_into_graph(Base *base)
{ {
/* Simple check: enabled bases are always part of dependency graph. */ /* Simple check: enabled bases are always part of dependency graph. */

View File

@ -37,7 +37,7 @@ class DepsgraphBuilderCache;
class DepsgraphBuilder { class DepsgraphBuilder {
public: public:
virtual ~DepsgraphBuilder(); virtual ~DepsgraphBuilder() = default;
virtual bool need_pull_base_into_graph(Base *base); virtual bool need_pull_base_into_graph(Base *base);

View File

@ -149,10 +149,6 @@ bool AnimatedPropertyStorage::isPropertyAnimated(const PointerRNA *pointer_rna,
/* Builder cache itself. */ /* Builder cache itself. */
DepsgraphBuilderCache::DepsgraphBuilderCache()
{
}
DepsgraphBuilderCache::~DepsgraphBuilderCache() DepsgraphBuilderCache::~DepsgraphBuilderCache()
{ {
for (AnimatedPropertyStorage *animated_property_storage : for (AnimatedPropertyStorage *animated_property_storage :

View File

@ -81,7 +81,6 @@ class AnimatedPropertyStorage {
/* Cached data which can be re-used by multiple builders. */ /* Cached data which can be re-used by multiple builders. */
class DepsgraphBuilderCache { class DepsgraphBuilderCache {
public: public:
DepsgraphBuilderCache();
~DepsgraphBuilderCache(); ~DepsgraphBuilderCache();
/* Makes sure storage for animated properties exists and initialized for the given ID. */ /* Makes sure storage for animated properties exists and initialized for the given ID. */

View File

@ -27,14 +27,6 @@
namespace blender::deg { namespace blender::deg {
BuilderMap::BuilderMap()
{
}
BuilderMap::~BuilderMap()
{
}
bool BuilderMap::checkIsBuilt(ID *id, int tag) const bool BuilderMap::checkIsBuilt(ID *id, int tag) const
{ {
return (getIDTag(id) & tag) == tag; return (getIDTag(id) & tag) == tag;

View File

@ -47,9 +47,6 @@ class BuilderMap {
TAG_SCENE_COMPOSITOR | TAG_SCENE_SEQUENCER | TAG_SCENE_AUDIO), TAG_SCENE_COMPOSITOR | TAG_SCENE_SEQUENCER | TAG_SCENE_AUDIO),
}; };
BuilderMap();
~BuilderMap();
/* Check whether given ID is already handled by builder (or if it's being handled). */ /* Check whether given ID is already handled by builder (or if it's being handled). */
bool checkIsBuilt(ID *id, int tag = TAG_COMPLETE) const; bool checkIsBuilt(ID *id, int tag = TAG_COMPLETE) const;

View File

@ -30,14 +30,6 @@
namespace blender::deg { namespace blender::deg {
RootPChanMap::RootPChanMap()
{
}
RootPChanMap::~RootPChanMap()
{
}
/* Debug contents of map */ /* Debug contents of map */
void RootPChanMap::print_debug() void RootPChanMap::print_debug()
{ {

View File

@ -29,10 +29,6 @@ namespace blender {
namespace deg { namespace deg {
struct RootPChanMap { struct RootPChanMap {
/* Constructor and destructor - Create and free the internal map respectively. */
RootPChanMap();
~RootPChanMap();
/* Debug contents of map. */ /* Debug contents of map. */
void print_debug(); void print_debug();

View File

@ -119,9 +119,7 @@ RNANodeQuery::RNANodeQuery(Depsgraph *depsgraph, DepsgraphBuilder *builder)
{ {
} }
RNANodeQuery::~RNANodeQuery() RNANodeQuery::~RNANodeQuery() = default;
{
}
Node *RNANodeQuery::find_node(const PointerRNA *ptr, Node *RNANodeQuery::find_node(const PointerRNA *ptr,
const PropertyRNA *prop, const PropertyRNA *prop,

View File

@ -40,10 +40,6 @@ AbstractBuilderPipeline::AbstractBuilderPipeline(::Depsgraph *graph)
{ {
} }
AbstractBuilderPipeline::~AbstractBuilderPipeline()
{
}
void AbstractBuilderPipeline::build() void AbstractBuilderPipeline::build()
{ {
double start_time = 0.0; double start_time = 0.0;

View File

@ -50,7 +50,7 @@ class DepsgraphRelationBuilder;
class AbstractBuilderPipeline { class AbstractBuilderPipeline {
public: public:
AbstractBuilderPipeline(::Depsgraph *graph); AbstractBuilderPipeline(::Depsgraph *graph);
virtual ~AbstractBuilderPipeline(); virtual ~AbstractBuilderPipeline() = default;
void build(); void build();

View File

@ -75,19 +75,11 @@ void animated_property_store_cb(ID *id, FCurve *fcurve, void *data_v)
} // namespace } // namespace
AnimationValueBackup::AnimationValueBackup()
{
}
AnimationValueBackup::AnimationValueBackup(const string &rna_path, int array_index, float value) AnimationValueBackup::AnimationValueBackup(const string &rna_path, int array_index, float value)
: rna_path(rna_path), array_index(array_index), value(value) : rna_path(rna_path), array_index(array_index), value(value)
{ {
} }
AnimationValueBackup::~AnimationValueBackup()
{
}
AnimationBackup::AnimationBackup(const Depsgraph *depsgraph) AnimationBackup::AnimationBackup(const Depsgraph *depsgraph)
{ {
meed_value_backup = !depsgraph->is_active; meed_value_backup = !depsgraph->is_active;

View File

@ -34,9 +34,8 @@ struct Depsgraph;
class AnimationValueBackup { class AnimationValueBackup {
public: public:
AnimationValueBackup(); AnimationValueBackup() = default;
AnimationValueBackup(const string &rna_path, int array_index, float value); AnimationValueBackup(const string &rna_path, int array_index, float value);
~AnimationValueBackup();
AnimationValueBackup(const AnimationValueBackup &other) = default; AnimationValueBackup(const AnimationValueBackup &other) = default;
AnimationValueBackup(AnimationValueBackup &&other) noexcept = default; AnimationValueBackup(AnimationValueBackup &&other) noexcept = default;

View File

@ -213,10 +213,6 @@ OperationNode::OperationNode() : name_tag(-1), flag(0)
{ {
} }
OperationNode::~OperationNode()
{
}
string OperationNode::identifier() const string OperationNode::identifier() const
{ {
return string(operationCodeAsString(opcode)) + "(" + name + ")"; return string(operationCodeAsString(opcode)) + "(" + name + ")";

View File

@ -231,7 +231,6 @@ enum OperationFlag {
/* Atomic Operation - Base type for all operations */ /* Atomic Operation - Base type for all operations */
struct OperationNode : public Node { struct OperationNode : public Node {
OperationNode(); OperationNode();
~OperationNode();
virtual string identifier() const override; virtual string identifier() const override;
string full_identifier() const; string full_identifier() const;

View File

@ -42,8 +42,7 @@ namespace gpu {
*/ */
class Batch : public GPUBatch { class Batch : public GPUBatch {
public: public:
Batch(){}; virtual ~Batch() = default;
virtual ~Batch(){};
virtual void draw(int v_first, int v_count, int i_first, int i_count) = 0; virtual void draw(int v_first, int v_count, int i_first, int i_count) = 0;

View File

@ -32,10 +32,8 @@
namespace blender::gpu { namespace blender::gpu {
ShaderInterface::ShaderInterface() /* TODO(fclem): add unique ID for debugging. */
{ ShaderInterface::ShaderInterface() = default;
/* TODO(fclem): add unique ID for debugging. */
}
ShaderInterface::~ShaderInterface() ShaderInterface::~ShaderInterface()
{ {

View File

@ -278,20 +278,6 @@ GLuint GLVaoCache::vao_get(GPUBatch *batch)
} }
/** \} */ /** \} */
/* -------------------------------------------------------------------- */
/** \name Creation & Deletion
* \{ */
GLBatch::GLBatch()
{
}
GLBatch::~GLBatch()
{
}
/** \} */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Drawing /** \name Drawing
* \{ */ * \{ */

View File

@ -96,9 +96,6 @@ class GLBatch : public Batch {
GLVaoCache vao_cache_; GLVaoCache vao_cache_;
public: public:
GLBatch();
~GLBatch();
void draw(int v_first, int v_count, int i_first, int i_count) override; void draw(int v_first, int v_count, int i_first, int i_count) override;
void bind(int i_first); void bind(int i_first);

View File

@ -120,10 +120,6 @@ class IMemStream : public Imf::IStream {
_exrbuf = exrbuf; _exrbuf = exrbuf;
} }
~IMemStream() override
{
}
bool read(char c[], int n) override bool read(char c[], int n) override
{ {
if (n + _exrpos <= _exrsize) { if (n + _exrpos <= _exrsize) {

View File

@ -51,10 +51,6 @@ CustomPropertiesExporter::CustomPropertiesExporter(ABCAbstractWriter *owner) : o
{ {
} }
CustomPropertiesExporter::~CustomPropertiesExporter()
{
}
void CustomPropertiesExporter::write_all(const IDProperty *group) void CustomPropertiesExporter::write_all(const IDProperty *group)
{ {
if (group == nullptr) { if (group == nullptr) {

View File

@ -61,7 +61,7 @@ class CustomPropertiesExporter {
public: public:
CustomPropertiesExporter(ABCAbstractWriter *owner); CustomPropertiesExporter(ABCAbstractWriter *owner);
virtual ~CustomPropertiesExporter(); virtual ~CustomPropertiesExporter() = default;
void write_all(const IDProperty *group); void write_all(const IDProperty *group);

View File

@ -45,10 +45,6 @@ ABCAbstractWriter::ABCAbstractWriter(const ABCWriterConstructorArgs &args)
{ {
} }
ABCAbstractWriter::~ABCAbstractWriter()
{
}
bool ABCAbstractWriter::is_supported(const HierarchyContext * /*context*/) const bool ABCAbstractWriter::is_supported(const HierarchyContext * /*context*/) const
{ {
return true; return true;

View File

@ -50,7 +50,6 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
public: public:
explicit ABCAbstractWriter(const ABCWriterConstructorArgs &args); explicit ABCAbstractWriter(const ABCWriterConstructorArgs &args);
virtual ~ABCAbstractWriter();
virtual void write(HierarchyContext &context) override; virtual void write(HierarchyContext &context) override;

View File

@ -35,10 +35,6 @@ ABCInstanceWriter::ABCInstanceWriter(const ABCWriterConstructorArgs &args)
{ {
} }
ABCInstanceWriter::~ABCInstanceWriter()
{
}
void ABCInstanceWriter::create_alembic_objects(const HierarchyContext *context) void ABCInstanceWriter::create_alembic_objects(const HierarchyContext *context)
{ {
OObject original = args_.hierarchy_iterator->get_alembic_object(context->original_export_path); OObject original = args_.hierarchy_iterator->get_alembic_object(context->original_export_path);

View File

@ -31,7 +31,6 @@ namespace blender::io::alembic {
class ABCInstanceWriter : public ABCAbstractWriter { class ABCInstanceWriter : public ABCAbstractWriter {
public: public:
explicit ABCInstanceWriter(const ABCWriterConstructorArgs &args); explicit ABCInstanceWriter(const ABCWriterConstructorArgs &args);
virtual ~ABCInstanceWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override; virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual Alembic::Abc::OObject get_alembic_object() const override; virtual Alembic::Abc::OObject get_alembic_object() const override;

View File

@ -113,10 +113,6 @@ void ABCGenericMeshWriter::create_alembic_objects(const HierarchyContext *contex
liquid_sim_modifier_ = get_liquid_sim_modifier(scene_eval, context->object); liquid_sim_modifier_ = get_liquid_sim_modifier(scene_eval, context->object);
} }
ABCGenericMeshWriter::~ABCGenericMeshWriter()
{
}
Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
{ {
if (is_subd_) { if (is_subd_) {

View File

@ -51,7 +51,6 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
public: public:
explicit ABCGenericMeshWriter(const ABCWriterConstructorArgs &args); explicit ABCGenericMeshWriter(const ABCWriterConstructorArgs &args);
virtual ~ABCGenericMeshWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override; virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual Alembic::Abc::OObject get_alembic_object() const override; virtual Alembic::Abc::OObject get_alembic_object() const override;

View File

@ -97,10 +97,6 @@ void AbcObjectReader::determine_inherits_xform()
} }
} }
AbcObjectReader::~AbcObjectReader()
{
}
const IObject &AbcObjectReader::iobject() const const IObject &AbcObjectReader::iobject() const
{ {
return m_iobject; return m_iobject;

View File

@ -100,7 +100,7 @@ class AbcObjectReader {
public: public:
explicit AbcObjectReader(const Alembic::Abc::IObject &object, ImportSettings &settings); explicit AbcObjectReader(const Alembic::Abc::IObject &object, ImportSettings &settings);
virtual ~AbcObjectReader(); virtual ~AbcObjectReader() = default;
const Alembic::Abc::IObject &iobject() const; const Alembic::Abc::IObject &iobject() const;

View File

@ -55,10 +55,7 @@ template<class T> static const char *bc_get_joint_name(T *node)
/* This is used to store data passed in write_controller_data. /* This is used to store data passed in write_controller_data.
* Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members * Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members
* so that arrays don't get freed until we free them explicitly. */ * so that arrays don't get freed until we free them explicitly. */
SkinInfo::SkinInfo() SkinInfo::SkinInfo() = default;
{
/* pass */
}
SkinInfo::SkinInfo(const SkinInfo &skin) SkinInfo::SkinInfo(const SkinInfo &skin)
: weights(skin.weights), : weights(skin.weights),

View File

@ -123,7 +123,7 @@ struct HierarchyContext {
*/ */
class AbstractHierarchyWriter { class AbstractHierarchyWriter {
public: public:
virtual ~AbstractHierarchyWriter(); virtual ~AbstractHierarchyWriter() = default;
virtual void write(HierarchyContext &context) = 0; virtual void write(HierarchyContext &context) = 0;
/* TODO(Sybren): add function like absent() that's called when a writer was previously created, /* 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 * 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); ObjectIdentifier(Object *object, Object *duplicated_by, const PersistentID &persistent_id);
public: public:
ObjectIdentifier(const ObjectIdentifier &other);
~ObjectIdentifier();
static ObjectIdentifier for_graph_root(); static ObjectIdentifier for_graph_root();
static ObjectIdentifier for_real_object(Object *object); static ObjectIdentifier for_real_object(Object *object);
static ObjectIdentifier for_hierarchy_context(const HierarchyContext *context); static ObjectIdentifier for_hierarchy_context(const HierarchyContext *context);

View File

@ -137,10 +137,6 @@ AbstractHierarchyWriter *EnsuredWriter::operator->()
return writer_; return writer_;
} }
AbstractHierarchyWriter::~AbstractHierarchyWriter()
{
}
bool AbstractHierarchyWriter::check_is_animated(const HierarchyContext &context) const bool AbstractHierarchyWriter::check_is_animated(const HierarchyContext &context) const
{ {
const Object *object = context.object; const Object *object = context.object;

View File

@ -25,14 +25,6 @@
namespace blender::io { namespace blender::io {
DupliParentFinder::DupliParentFinder()
{
}
DupliParentFinder::~DupliParentFinder()
{
}
void DupliParentFinder::insert(const DupliObject *dupli_ob) void DupliParentFinder::insert(const DupliObject *dupli_ob)
{ {
dupli_set_.insert(dupli_ob->ob); dupli_set_.insert(dupli_ob->ob);

View File

@ -43,9 +43,6 @@ class DupliParentFinder final {
InstancerPIDToDuplisMap instancer_pid_to_duplis_; InstancerPIDToDuplisMap instancer_pid_to_duplis_;
public: public:
DupliParentFinder();
~DupliParentFinder();
void insert(const DupliObject *dupli_ob); void insert(const DupliObject *dupli_ob);
bool is_duplicated(const Object *object) const; bool is_duplicated(const Object *object) const;

View File

@ -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) ObjectIdentifier ObjectIdentifier::for_real_object(Object *object)
{ {
return ObjectIdentifier(object, nullptr, PersistentID()); return ObjectIdentifier(object, nullptr, PersistentID());

View File

@ -41,10 +41,6 @@ USDAbstractWriter::USDAbstractWriter(const USDExporterContext &usd_export_contex
{ {
} }
USDAbstractWriter::~USDAbstractWriter()
{
}
bool USDAbstractWriter::is_supported(const HierarchyContext * /*context*/) const bool USDAbstractWriter::is_supported(const HierarchyContext * /*context*/) const
{ {
return true; return true;

View File

@ -49,7 +49,6 @@ class USDAbstractWriter : public AbstractHierarchyWriter {
public: public:
USDAbstractWriter(const USDExporterContext &usd_export_context); USDAbstractWriter(const USDExporterContext &usd_export_context);
virtual ~USDAbstractWriter();
virtual void write(HierarchyContext &context) override; virtual void write(HierarchyContext &context) override;