devirtualize method calls by declaring classes and methods final
This commit is contained in:
@@ -454,7 +454,7 @@ public:
|
||||
virtual bool isIdentity () const = 0;
|
||||
};
|
||||
|
||||
class DiagonalCurve : public Curve
|
||||
class DiagonalCurve final : public Curve
|
||||
{
|
||||
|
||||
protected:
|
||||
@@ -476,7 +476,7 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class FlatCurve : public Curve, public rtengine::NonCopyable
|
||||
class FlatCurve final : public Curve, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
@@ -658,7 +658,7 @@ public:
|
||||
|
||||
/* If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed
|
||||
* Can be safely used to reallocate an existing image */
|
||||
void allocate (int W, int H) override
|
||||
void allocate (int W, int H) override final
|
||||
{
|
||||
|
||||
if (W == width && H == height) {
|
||||
@@ -746,7 +746,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void rotate (int deg) override
|
||||
void rotate (int deg) override final
|
||||
{
|
||||
|
||||
if (deg == 90) {
|
||||
@@ -873,7 +873,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void hflip () override
|
||||
void hflip () override final
|
||||
{
|
||||
int width2 = width / 2;
|
||||
|
||||
@@ -905,7 +905,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void vflip () override
|
||||
void vflip () override final
|
||||
{
|
||||
|
||||
int height2 = height / 2;
|
||||
@@ -989,7 +989,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override
|
||||
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override final
|
||||
{
|
||||
histogram.clear();
|
||||
avg_r = avg_g = avg_b = 0.;
|
||||
@@ -1328,7 +1328,7 @@ public:
|
||||
* If any of the required allocation fails, "width" and "height" are set to -1, and all remaining buffer are freed
|
||||
* Can be safely used to reallocate an existing image or to free up it's memory with "allocate (0,0);"
|
||||
*/
|
||||
void allocate (int W, int H) override
|
||||
void allocate (int W, int H) override final
|
||||
{
|
||||
|
||||
if (W == width && H == height) {
|
||||
@@ -1382,7 +1382,7 @@ public:
|
||||
memcpy (dest->data, data, 3 * width * height * sizeof(T));
|
||||
}
|
||||
|
||||
void rotate (int deg) override
|
||||
void rotate (int deg) override final
|
||||
{
|
||||
|
||||
if (deg == 90) {
|
||||
@@ -1516,7 +1516,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void hflip () override
|
||||
void hflip () override final
|
||||
{
|
||||
int width2 = width / 2;
|
||||
|
||||
@@ -1552,7 +1552,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void vflip () override
|
||||
void vflip () override final
|
||||
{
|
||||
|
||||
AlignedBuffer<T> lBuffer(3 * width);
|
||||
@@ -1619,7 +1619,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override
|
||||
void computeHistogramAutoWB (double &avg_r, double &avg_g, double &avg_b, int &n, LUTu &histogram, const int compression) const override final
|
||||
{
|
||||
histogram.clear();
|
||||
avg_r = avg_g = avg_b = 0.;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace rtengine
|
||||
class Image8;
|
||||
class Imagefloat;
|
||||
|
||||
class Image16 : public IImage16, public ImageIO
|
||||
class Image16 final : public IImage16, public ImageIO
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace rtengine
|
||||
{
|
||||
class Imagefloat;
|
||||
|
||||
class Image8 : public IImage8, public ImageIO
|
||||
class Image8 final : public IImage8, public ImageIO
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -38,7 +38,7 @@ class TagDirectory;
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class FrameData
|
||||
class FrameData final
|
||||
{
|
||||
|
||||
protected:
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
int getRating () const;
|
||||
};
|
||||
|
||||
class FramesData : public FramesMetaData {
|
||||
class FramesData final : public FramesMetaData {
|
||||
private:
|
||||
// frame's root IFD, can be a file root IFD or a SUB-IFD
|
||||
std::vector<std::unique_ptr<FrameData>> frames;
|
||||
|
||||
@@ -34,7 +34,7 @@ class LabImage;
|
||||
/*
|
||||
* Image type used by most tools; expected range: [0.0 ; 65535.0]
|
||||
*/
|
||||
class Imagefloat : public IImagefloat, public ImageIO
|
||||
class Imagefloat final : public IImagefloat, public ImageIO
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -143,11 +143,11 @@ public:
|
||||
|
||||
virtual void setProgressListener (ProgressListener* pl) {}
|
||||
|
||||
void increaseRef () override
|
||||
void increaseRef () override final
|
||||
{
|
||||
references++;
|
||||
}
|
||||
void decreaseRef () override
|
||||
void decreaseRef () override final
|
||||
{
|
||||
references--;
|
||||
|
||||
@@ -175,15 +175,15 @@ public:
|
||||
return dirpyrdenoiseExpComp;
|
||||
}
|
||||
// functions inherited from the InitialImage interface
|
||||
Glib::ustring getFileName () override
|
||||
Glib::ustring getFileName () override final
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
cmsHPROFILE getEmbeddedProfile () override
|
||||
cmsHPROFILE getEmbeddedProfile () override final
|
||||
{
|
||||
return embProfile;
|
||||
}
|
||||
const FramesMetaData* getMetaData () override
|
||||
const FramesMetaData* getMetaData () override final
|
||||
{
|
||||
return idata;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class Crop;
|
||||
* but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object,
|
||||
* while detail windows are framed Crop objects.
|
||||
*/
|
||||
class ImProcCoordinator : public StagedImageProcessor
|
||||
class ImProcCoordinator final : public StagedImageProcessor
|
||||
{
|
||||
|
||||
friend class Crop;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class ProcessingJobImpl : public ProcessingJob
|
||||
class ProcessingJobImpl final : public ProcessingJob
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -37,7 +37,7 @@ class DiagonalCurve;
|
||||
class RetinextransmissionCurve;
|
||||
class RetinexgaintransmissionCurve;
|
||||
|
||||
class RawImageSource : public ImageSource
|
||||
class RawImageSource final : public ImageSource
|
||||
{
|
||||
private:
|
||||
static DiagonalCurve *phaseOneIccCurve;
|
||||
|
||||
Reference in New Issue
Block a user