Merge pull request #5617 from Beep6581/devirtualize
devirtualize method calls by declaring classes and methods final
This commit is contained in:
@@ -21,7 +21,7 @@ struct camera_const_levels {
|
||||
int levels[4];
|
||||
};
|
||||
|
||||
class CameraConst
|
||||
class CameraConst final
|
||||
{
|
||||
private:
|
||||
std::string make_model;
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
void update_globalGreenEquilibration(bool other);
|
||||
};
|
||||
|
||||
class CameraConstantsStore
|
||||
class CameraConstantsStore final
|
||||
{
|
||||
private:
|
||||
std::map<std::string, CameraConst *> mCameraConstants;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class CieImage :
|
||||
class CieImage final :
|
||||
public NonCopyable
|
||||
{
|
||||
private:
|
||||
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
virtual bool isIdentity () const = 0;
|
||||
};
|
||||
|
||||
class DiagonalCurve : public Curve
|
||||
class DiagonalCurve final : public Curve
|
||||
{
|
||||
|
||||
protected:
|
||||
@@ -478,7 +478,7 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class FlatCurve : public Curve, public rtengine::NonCopyable
|
||||
class FlatCurve final : public Curve, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,7 +32,7 @@ using namespace procparams;
|
||||
|
||||
class ImProcCoordinator;
|
||||
|
||||
class Crop : public DetailedCrop, public PipetteBuffer
|
||||
class Crop final : public DetailedCrop, public PipetteBuffer
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace rtengine
|
||||
{
|
||||
|
||||
class RawImage;
|
||||
class dfInfo
|
||||
class dfInfo final
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
void updateRawImage();
|
||||
};
|
||||
|
||||
class DFManager
|
||||
class DFManager final
|
||||
{
|
||||
public:
|
||||
void init(const Glib::ustring &pathname);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace rtengine
|
||||
{
|
||||
|
||||
class RawImage;
|
||||
class ffInfo
|
||||
class ffInfo final
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
void updateRawImage();
|
||||
};
|
||||
|
||||
class FFManager
|
||||
class FFManager final
|
||||
{
|
||||
public:
|
||||
void init(const Glib::ustring &pathname);
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace procparams
|
||||
|
||||
typedef const double(*TMatrix)[3];
|
||||
|
||||
class ProfileContent
|
||||
class ProfileContent final
|
||||
{
|
||||
public:
|
||||
ProfileContent();
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
std::string data;
|
||||
};
|
||||
|
||||
class ICCStore
|
||||
class ICCStore final
|
||||
{
|
||||
public:
|
||||
enum class ProfileType {
|
||||
|
||||
@@ -664,7 +664,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) final
|
||||
{
|
||||
|
||||
if (W == width && H == height) {
|
||||
@@ -752,7 +752,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void rotate (int deg) override
|
||||
void rotate (int deg) final
|
||||
{
|
||||
|
||||
if (deg == 90) {
|
||||
@@ -879,7 +879,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void hflip () override
|
||||
void hflip () final
|
||||
{
|
||||
int width2 = width / 2;
|
||||
|
||||
@@ -911,7 +911,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void vflip () override
|
||||
void vflip () final
|
||||
{
|
||||
|
||||
int height2 = height / 2;
|
||||
@@ -995,7 +995,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 final
|
||||
{
|
||||
histogram.clear();
|
||||
avg_r = avg_g = avg_b = 0.;
|
||||
@@ -1334,7 +1334,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) final
|
||||
{
|
||||
|
||||
if (W == width && H == height) {
|
||||
@@ -1388,7 +1388,7 @@ public:
|
||||
memcpy (dest->data, data, 3 * width * height * sizeof(T));
|
||||
}
|
||||
|
||||
void rotate (int deg) override
|
||||
void rotate (int deg) final
|
||||
{
|
||||
|
||||
if (deg == 90) {
|
||||
@@ -1522,7 +1522,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void hflip () override
|
||||
void hflip () final
|
||||
{
|
||||
int width2 = width / 2;
|
||||
|
||||
@@ -1558,7 +1558,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void vflip () override
|
||||
void vflip () final
|
||||
{
|
||||
|
||||
AlignedBuffer<T> lBuffer(3 * width);
|
||||
@@ -1625,7 +1625,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 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:
|
||||
|
||||
@@ -44,7 +44,7 @@ class TagDirectory;
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class FrameData
|
||||
class FrameData final
|
||||
{
|
||||
|
||||
protected:
|
||||
@@ -101,7 +101,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:
|
||||
|
||||
@@ -142,11 +142,11 @@ public:
|
||||
|
||||
virtual void setProgressListener (ProgressListener* pl) {}
|
||||
|
||||
void increaseRef () override
|
||||
void increaseRef () final
|
||||
{
|
||||
references++;
|
||||
}
|
||||
void decreaseRef () override
|
||||
void decreaseRef () final
|
||||
{
|
||||
references--;
|
||||
|
||||
@@ -174,15 +174,15 @@ public:
|
||||
return dirpyrdenoiseExpComp;
|
||||
}
|
||||
// functions inherited from the InitialImage interface
|
||||
Glib::ustring getFileName () override
|
||||
Glib::ustring getFileName () final
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
cmsHPROFILE getEmbeddedProfile () override
|
||||
cmsHPROFILE getEmbeddedProfile () final
|
||||
{
|
||||
return embProfile;
|
||||
}
|
||||
const FramesMetaData* getMetaData () override
|
||||
const FramesMetaData* getMetaData () final
|
||||
{
|
||||
return idata;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,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;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class LabImage
|
||||
class LabImage final
|
||||
{
|
||||
private:
|
||||
void allocLab(size_t w, size_t h);
|
||||
|
||||
@@ -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