From 19dfb6ea1f6745c0dbc2ce21839c30184b553878 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 8 Apr 2021 11:07:12 +0200 Subject: 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 --- source/blender/compositor/intern/COM_NodeGraph.cc | 4 - source/blender/compositor/intern/COM_NodeGraph.h | 1 - .../compositor/intern/COM_NodeOperationBuilder.cc | 4 - .../compositor/intern/COM_NodeOperationBuilder.h | 1 - .../operations/COM_AlphaOverKeyOperation.cc | 5 -- .../operations/COM_AlphaOverKeyOperation.h | 5 -- .../COM_AlphaOverPremultiplyOperation.cc | 5 -- .../operations/COM_AlphaOverPremultiplyOperation.h | 5 -- .../COM_CalculateStandardDeviationOperation.cc | 5 -- .../COM_CalculateStandardDeviationOperation.h | 2 - .../COM_ConvolutionEdgeFilterOperation.cc | 5 -- .../COM_ConvolutionEdgeFilterOperation.h | 1 - .../operations/COM_DistanceYCCMatteOperation.cc | 5 -- .../operations/COM_DistanceYCCMatteOperation.h | 6 -- .../compositor/operations/COM_MixOperation.cc | 95 ---------------------- .../compositor/operations/COM_MixOperation.h | 19 ----- 16 files changed, 168 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/intern/COM_NodeGraph.cc b/source/blender/compositor/intern/COM_NodeGraph.cc index 1907022e0ec..fbe56dd4b5a 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.cc +++ b/source/blender/compositor/intern/COM_NodeGraph.cc @@ -39,10 +39,6 @@ namespace blender::compositor { **** NodeGraph **** *******************/ -NodeGraph::NodeGraph() -{ -} - NodeGraph::~NodeGraph() { while (m_nodes.size()) { diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h index 68bba7b1007..7fa01593e1e 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.h +++ b/source/blender/compositor/intern/COM_NodeGraph.h @@ -56,7 +56,6 @@ class NodeGraph { Vector m_links; public: - NodeGraph(); ~NodeGraph(); const Vector &nodes() const diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc index 889af4ea39a..82eb969b752 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc @@ -46,10 +46,6 @@ NodeOperationBuilder::NodeOperationBuilder(const CompositorContext *context, bNo m_graph.from_bNodeTree(*context, b_nodetree); } -NodeOperationBuilder::~NodeOperationBuilder() -{ -} - void NodeOperationBuilder::convertToOperations(ExecutionSystem *system) { /* interface handle for nodes */ diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.h b/source/blender/compositor/intern/COM_NodeOperationBuilder.h index 3b0ce57ed26..b2fb822af25 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.h +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.h @@ -87,7 +87,6 @@ class NodeOperationBuilder { public: NodeOperationBuilder(const CompositorContext *context, bNodeTree *b_nodetree); - ~NodeOperationBuilder(); const CompositorContext &context() const { diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cc b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cc index 34638cbe7d6..0c656753a51 100644 --- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cc +++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cc @@ -20,11 +20,6 @@ namespace blender::compositor { -AlphaOverKeyOperation::AlphaOverKeyOperation() -{ - /* pass */ -} - void AlphaOverKeyOperation::executePixelSampled(float output[4], float x, float y, diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h index 8b8debefa7a..83713d18971 100644 --- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h +++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h @@ -28,11 +28,6 @@ namespace blender::compositor { */ class AlphaOverKeyOperation : public MixBaseOperation { public: - /** - * Default constructor - */ - AlphaOverKeyOperation(); - /** * The inner loop of this operation. */ diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc index edb248d16e8..3dd4607e273 100644 --- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc +++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc @@ -20,11 +20,6 @@ namespace blender::compositor { -AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() -{ - /* pass */ -} - void AlphaOverPremultiplyOperation::executePixelSampled(float output[4], float x, float y, diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h index 16246231a57..f1d4b668fce 100644 --- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h +++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h @@ -28,11 +28,6 @@ namespace blender::compositor { */ class AlphaOverPremultiplyOperation : public MixBaseOperation { public: - /** - * Default constructor - */ - AlphaOverPremultiplyOperation(); - /** * The inner loop of this operation. */ diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cc b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cc index 5ddb4b1c859..ed554b9ac06 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cc +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cc @@ -24,11 +24,6 @@ namespace blender::compositor { -CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() -{ - /* pass */ -} - void CalculateStandardDeviationOperation::executePixel(float output[4], int /*x*/, int /*y*/, diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h index b8487e0aa4c..bc4aca69546 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h @@ -34,8 +34,6 @@ class CalculateStandardDeviationOperation : public CalculateMeanOperation { float m_standardDeviation; public: - CalculateStandardDeviationOperation(); - /** * The inner loop of this operation. */ diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cc b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cc index 9114200a8ec..5ead300a368 100644 --- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cc +++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cc @@ -21,11 +21,6 @@ namespace blender::compositor { -ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation() -{ - /* pass */ -} - 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}; diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h index 98bfa1768d8..319b424bd4a 100644 --- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h +++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h @@ -24,7 +24,6 @@ namespace blender::compositor { class ConvolutionEdgeFilterOperation : public ConvolutionFilterOperation { public: - ConvolutionEdgeFilterOperation(); void executePixel(float output[4], int x, int y, void *data) override; }; diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cc b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cc index 15ed2b0aaa4..597545dd706 100644 --- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cc +++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cc @@ -21,11 +21,6 @@ namespace blender::compositor { -DistanceYCCMatteOperation::DistanceYCCMatteOperation() -{ - /* pass */ -} - float DistanceYCCMatteOperation::calculateDistance(float key[4], float image[4]) { /* only measure the second 2 values */ diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h index 9027fbabe7b..a87e885e5d8 100644 --- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h +++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h @@ -30,12 +30,6 @@ namespace blender::compositor { class DistanceYCCMatteOperation : public DistanceRGBMatteOperation { protected: float calculateDistance(float key[4], float image[4]) override; - - public: - /** - * Default constructor - */ - DistanceYCCMatteOperation(); }; } // namespace blender::compositor diff --git a/source/blender/compositor/operations/COM_MixOperation.cc b/source/blender/compositor/operations/COM_MixOperation.cc index 70f3242c076..882326a04b1 100644 --- a/source/blender/compositor/operations/COM_MixOperation.cc +++ b/source/blender/compositor/operations/COM_MixOperation.cc @@ -99,11 +99,6 @@ void MixBaseOperation::deinitExecution() /* ******** Mix Add Operation ******** */ -MixAddOperation::MixAddOperation() -{ - /* pass */ -} - void MixAddOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; @@ -128,11 +123,6 @@ void MixAddOperation::executePixelSampled(float output[4], float x, float y, Pix /* ******** Mix Blend Operation ******** */ -MixBlendOperation::MixBlendOperation() -{ - /* pass */ -} - void MixBlendOperation::executePixelSampled(float output[4], float x, float y, @@ -162,11 +152,6 @@ void MixBlendOperation::executePixelSampled(float output[4], /* ******** Mix Burn Operation ******** */ -MixColorBurnOperation::MixColorBurnOperation() -{ - /* pass */ -} - void MixColorBurnOperation::executePixelSampled(float output[4], float x, float y, @@ -245,11 +230,6 @@ void MixColorBurnOperation::executePixelSampled(float output[4], /* ******** Mix Color Operation ******** */ -MixColorOperation::MixColorOperation() -{ - /* pass */ -} - void MixColorOperation::executePixelSampled(float output[4], float x, float y, @@ -290,11 +270,6 @@ void MixColorOperation::executePixelSampled(float output[4], /* ******** Mix Darken Operation ******** */ -MixDarkenOperation::MixDarkenOperation() -{ - /* pass */ -} - void MixDarkenOperation::executePixelSampled(float output[4], float x, float y, @@ -323,11 +298,6 @@ void MixDarkenOperation::executePixelSampled(float output[4], /* ******** Mix Difference Operation ******** */ -MixDifferenceOperation::MixDifferenceOperation() -{ - /* pass */ -} - void MixDifferenceOperation::executePixelSampled(float output[4], float x, float y, @@ -356,11 +326,6 @@ void MixDifferenceOperation::executePixelSampled(float output[4], /* ******** Mix Difference Operation ******** */ -MixDivideOperation::MixDivideOperation() -{ - /* pass */ -} - void MixDivideOperation::executePixelSampled(float output[4], float x, float y, @@ -406,11 +371,6 @@ void MixDivideOperation::executePixelSampled(float output[4], /* ******** Mix Dodge Operation ******** */ -MixDodgeOperation::MixDodgeOperation() -{ - /* pass */ -} - void MixDodgeOperation::executePixelSampled(float output[4], float x, float y, @@ -494,11 +454,6 @@ void MixDodgeOperation::executePixelSampled(float output[4], /* ******** Mix Glare Operation ******** */ -MixGlareOperation::MixGlareOperation() -{ - /* pass */ -} - void MixGlareOperation::executePixelSampled(float output[4], float x, float y, @@ -535,11 +490,6 @@ void MixGlareOperation::executePixelSampled(float output[4], /* ******** Mix Hue Operation ******** */ -MixHueOperation::MixHueOperation() -{ - /* pass */ -} - void MixHueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; @@ -577,11 +527,6 @@ void MixHueOperation::executePixelSampled(float output[4], float x, float y, Pix /* ******** Mix Lighten Operation ******** */ -MixLightenOperation::MixLightenOperation() -{ - /* pass */ -} - void MixLightenOperation::executePixelSampled(float output[4], float x, float y, @@ -628,11 +573,6 @@ void MixLightenOperation::executePixelSampled(float output[4], /* ******** Mix Linear Light Operation ******** */ -MixLinearLightOperation::MixLinearLightOperation() -{ - /* pass */ -} - void MixLinearLightOperation::executePixelSampled(float output[4], float x, float y, @@ -676,11 +616,6 @@ void MixLinearLightOperation::executePixelSampled(float output[4], /* ******** Mix Multiply Operation ******** */ -MixMultiplyOperation::MixMultiplyOperation() -{ - /* pass */ -} - void MixMultiplyOperation::executePixelSampled(float output[4], float x, float y, @@ -709,11 +644,6 @@ void MixMultiplyOperation::executePixelSampled(float output[4], /* ******** Mix Overlay Operation ******** */ -MixOverlayOperation::MixOverlayOperation() -{ - /* pass */ -} - void MixOverlayOperation::executePixelSampled(float output[4], float x, float y, @@ -759,11 +689,6 @@ void MixOverlayOperation::executePixelSampled(float output[4], /* ******** Mix Saturation Operation ******** */ -MixSaturationOperation::MixSaturationOperation() -{ - /* pass */ -} - void MixSaturationOperation::executePixelSampled(float output[4], float x, float y, @@ -801,11 +726,6 @@ void MixSaturationOperation::executePixelSampled(float output[4], /* ******** Mix Screen Operation ******** */ -MixScreenOperation::MixScreenOperation() -{ - /* pass */ -} - void MixScreenOperation::executePixelSampled(float output[4], float x, float y, @@ -835,11 +755,6 @@ void MixScreenOperation::executePixelSampled(float output[4], /* ******** Mix Soft Light Operation ******** */ -MixSoftLightOperation::MixSoftLightOperation() -{ - /* pass */ -} - void MixSoftLightOperation::executePixelSampled(float output[4], float x, float y, @@ -881,11 +796,6 @@ void MixSoftLightOperation::executePixelSampled(float output[4], /* ******** Mix Subtract Operation ******** */ -MixSubtractOperation::MixSubtractOperation() -{ - /* pass */ -} - void MixSubtractOperation::executePixelSampled(float output[4], float x, float y, @@ -913,11 +823,6 @@ void MixSubtractOperation::executePixelSampled(float output[4], /* ******** Mix Value Operation ******** */ -MixValueOperation::MixValueOperation() -{ - /* pass */ -} - void MixValueOperation::executePixelSampled(float output[4], float x, float y, diff --git a/source/blender/compositor/operations/COM_MixOperation.h b/source/blender/compositor/operations/COM_MixOperation.h index 86200c9836e..6c241bc5762 100644 --- a/source/blender/compositor/operations/COM_MixOperation.h +++ b/source/blender/compositor/operations/COM_MixOperation.h @@ -85,115 +85,96 @@ class MixBaseOperation : public NodeOperation { class MixAddOperation : public MixBaseOperation { public: - MixAddOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixBlendOperation : public MixBaseOperation { public: - MixBlendOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixColorBurnOperation : public MixBaseOperation { public: - MixColorBurnOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixColorOperation : public MixBaseOperation { public: - MixColorOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixDarkenOperation : public MixBaseOperation { public: - MixDarkenOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixDifferenceOperation : public MixBaseOperation { public: - MixDifferenceOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixDivideOperation : public MixBaseOperation { public: - MixDivideOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixDodgeOperation : public MixBaseOperation { public: - MixDodgeOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixGlareOperation : public MixBaseOperation { public: - MixGlareOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixHueOperation : public MixBaseOperation { public: - MixHueOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixLightenOperation : public MixBaseOperation { public: - MixLightenOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixLinearLightOperation : public MixBaseOperation { public: - MixLinearLightOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixMultiplyOperation : public MixBaseOperation { public: - MixMultiplyOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixOverlayOperation : public MixBaseOperation { public: - MixOverlayOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixSaturationOperation : public MixBaseOperation { public: - MixSaturationOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixScreenOperation : public MixBaseOperation { public: - MixScreenOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixSoftLightOperation : public MixBaseOperation { public: - MixSoftLightOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixSubtractOperation : public MixBaseOperation { public: - MixSubtractOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; class MixValueOperation : public MixBaseOperation { public: - MixValueOperation(); void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; }; -- cgit v1.2.3