cppcheck: further fixes
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "../rtgui/mydiagonalcurve.h"
|
||||
#include "color.h"
|
||||
#include "pipettebuffer.h"
|
||||
|
||||
#include "noncopyable.h"
|
||||
#include "LUT.h"
|
||||
|
||||
#define CURVES_MIN_POLY_POINTS 1000
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class FlatCurve : public Curve
|
||||
class FlatCurve : public Curve, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
private:
|
||||
|
@@ -328,8 +328,8 @@ void DFManager::init(const Glib::ustring& pathname)
|
||||
} else {
|
||||
printf( "%s: MEAN of \n ", i.key().c_str());
|
||||
|
||||
for( std::list<Glib::ustring>::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); ++iter ) {
|
||||
printf( "%s, ", iter->c_str() );
|
||||
for(std::list<Glib::ustring>::iterator path = i.pathNames.begin(); path != i.pathNames.end(); ++path) {
|
||||
printf("%s, ", path->c_str());
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
@@ -277,8 +277,8 @@ void FFManager::init(const Glib::ustring& pathname)
|
||||
} else {
|
||||
printf( "%s: MEAN of \n ", i.key().c_str());
|
||||
|
||||
for( std::list<Glib::ustring>::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); ++iter ) {
|
||||
printf( "%s, ", iter->c_str() );
|
||||
for(std::list<Glib::ustring>::iterator path = i.pathNames.begin(); path != i.pathNames.end(); ++path) {
|
||||
printf("%s, ", path->c_str());
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
@@ -106,10 +106,10 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab)
|
||||
#pragma omp parallel for if (multiThread)
|
||||
#endif
|
||||
for (int l = 0; l < 32768; ++l) {
|
||||
auto base = pow_F(l / 32768.f, gamma);
|
||||
auto val = pow_F(l / 32768.f, gamma);
|
||||
// get a bit more contrast in the shadows
|
||||
base = sh_contrast.getVal(base);
|
||||
f[l] = base * 32768.f;
|
||||
val = sh_contrast.getVal(val);
|
||||
f[l] = val * 32768.f;
|
||||
}
|
||||
} else {
|
||||
#ifdef _OPENMP
|
||||
@@ -119,10 +119,10 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab)
|
||||
float l, a, b;
|
||||
float R = c, G = c, B = c;
|
||||
rgb2lab(R, G, B, l, a, b);
|
||||
auto base = pow_F(l / 32768.f, gamma);
|
||||
auto val = pow_F(l / 32768.f, gamma);
|
||||
// get a bit more contrast in the shadows
|
||||
base = sh_contrast.getVal(base);
|
||||
l = base * 32768.f;
|
||||
val = sh_contrast.getVal(val);
|
||||
l = val * 32768.f;
|
||||
lab2rgb(l, a, b, R, G, B);
|
||||
f[c] = G;
|
||||
}
|
||||
@@ -133,8 +133,8 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab)
|
||||
#pragma omp parallel for if (multiThread)
|
||||
#endif
|
||||
for (int l = 0; l < 32768; ++l) {
|
||||
auto base = pow_F(l / 32768.f, gamma);
|
||||
f[l] = base * 32768.f;
|
||||
auto val = pow_F(l / 32768.f, gamma);
|
||||
f[l] = val * 32768.f;
|
||||
}
|
||||
} else {
|
||||
#ifdef _OPENMP
|
||||
@@ -144,8 +144,8 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab)
|
||||
float l, a, b;
|
||||
float R = c, G = c, B = c;
|
||||
rgb2lab(R, G, B, l, a, b);
|
||||
auto base = pow_F(l / 32768.f, gamma);
|
||||
l = base * 32768.f;
|
||||
auto val = pow_F(l / 32768.f, gamma);
|
||||
l = val * 32768.f;
|
||||
lab2rgb(l, a, b, R, G, B);
|
||||
f[c] = G;
|
||||
}
|
||||
|
@@ -20,12 +20,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rawimagesource.h"
|
||||
#include <vector>
|
||||
#include "rawimagesource.h"
|
||||
#include "noncopyable.h"
|
||||
|
||||
namespace rtengine {
|
||||
|
||||
class PDAFLinesFilter {
|
||||
class PDAFLinesFilter: public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
explicit PDAFLinesFilter(RawImage *ri);
|
||||
~PDAFLinesFilter();
|
||||
|
@@ -429,6 +429,7 @@ RawImageSource::RawImageSource ()
|
||||
, plistener(nullptr)
|
||||
, scale_mul{}
|
||||
, c_black{}
|
||||
, c_white{}
|
||||
, cblacksom{}
|
||||
, ref_pre_mul{}
|
||||
, refwb_red(0.0)
|
||||
|
@@ -380,7 +380,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::string EffectiveMaxApertureString = "";
|
||||
std::string EffectiveMaxApertureString;
|
||||
|
||||
if (!d100) {
|
||||
int EffectiveMaxApertureValue;
|
||||
|
@@ -190,7 +190,7 @@ public:
|
||||
};
|
||||
|
||||
// a table of tags: id are offset from beginning and not identifiers
|
||||
class TagDirectoryTable: public TagDirectory
|
||||
class TagDirectoryTable: public TagDirectory, public rtengine::NonCopyable
|
||||
{
|
||||
protected:
|
||||
unsigned char *values; // Tags values are saved internally here
|
||||
|
@@ -631,21 +631,21 @@ void Adjuster::setSliderValue(double val)
|
||||
if (val >= logPivot) {
|
||||
double range = vMax - logPivot;
|
||||
double x = (val - logPivot) / range;
|
||||
val = (vMin + mid) + std::log(x * (logBase - 1.0) + 1.0) / std::log(logBase) * mid;
|
||||
val = (vMin + mid) + std::log1p(x * (logBase - 1.0)) / std::log(logBase) * mid;
|
||||
} else {
|
||||
double range = logPivot - vMin;
|
||||
double x = (logPivot - val) / range;
|
||||
val = (vMin + mid) - std::log(x * (logBase - 1.0) + 1.0) / std::log(logBase) * mid;
|
||||
val = (vMin + mid) - std::log1p(x * (logBase - 1.0)) / std::log(logBase) * mid;
|
||||
}
|
||||
} else {
|
||||
if (val >= logPivot) {
|
||||
double range = vMax - logPivot;
|
||||
double x = (val - logPivot) / range;
|
||||
val = logPivot + std::log(x * (logBase - 1.0) + 1.0) / std::log(logBase) * range;
|
||||
val = logPivot + std::log1p(x * (logBase - 1.0)) / std::log(logBase) * range;
|
||||
} else {
|
||||
double range = logPivot - vMin;
|
||||
double x = (logPivot - val) / range;
|
||||
val = logPivot - std::log(x * (logBase - 1.0) + 1.0) / std::log(logBase) * range;
|
||||
val = logPivot - std::log1p(x * (logBase - 1.0)) / std::log(logBase) * range;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "options.h"
|
||||
#include "threadutils.h"
|
||||
#include "thumbbrowserbase.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class BatchQueueListener
|
||||
{
|
||||
@@ -44,7 +45,8 @@ class FileCatalog;
|
||||
class BatchQueue final :
|
||||
public ThumbBrowserBase,
|
||||
public rtengine::BatchProcessingListener,
|
||||
public LWButtonListener
|
||||
public LWButtonListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
explicit BatchQueue (FileCatalog* aFileCatalog);
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "thumbbrowserentrybase.h"
|
||||
#include "thumbnail.h"
|
||||
#include "bqentryupdater.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class BatchQueueEntry;
|
||||
struct BatchQueueEntryIdleHelper {
|
||||
@@ -34,7 +35,7 @@ struct BatchQueueEntryIdleHelper {
|
||||
int pending;
|
||||
};
|
||||
|
||||
class BatchQueueEntry : public ThumbBrowserEntryBase, public BQEntryUpdateListener
|
||||
class BatchQueueEntry : public ThumbBrowserEntryBase, public BQEntryUpdateListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
guint8* opreview;
|
||||
|
@@ -1400,24 +1400,19 @@ void Crop::cropResized (int &x, int &y, int& x2, int& y2)
|
||||
y2 = maxh - 1;
|
||||
}
|
||||
|
||||
int X, Y;
|
||||
int W;
|
||||
|
||||
if (x < x2) {
|
||||
W = x2 - x + 1;
|
||||
X = x;
|
||||
} else {
|
||||
W = x - x2 + 1;
|
||||
X = x2;
|
||||
}
|
||||
|
||||
int H;
|
||||
|
||||
int Y;
|
||||
if (y < y2) {
|
||||
H = y2 - y + 1;
|
||||
Y = y;
|
||||
} else {
|
||||
H = y - y2 + 1;
|
||||
Y = y2;
|
||||
}
|
||||
|
||||
@@ -1425,6 +1420,7 @@ void Crop::cropResized (int &x, int &y, int& x2, int& y2)
|
||||
W = maxw;
|
||||
}
|
||||
|
||||
int H;
|
||||
if (fixr->get_active()) {
|
||||
double r = getRatio ();
|
||||
|
||||
@@ -1457,6 +1453,7 @@ void Crop::cropResized (int &x, int &y, int& x2, int& y2)
|
||||
}
|
||||
}
|
||||
|
||||
int X;
|
||||
if (x < x2) {
|
||||
W = x2 - x + 1;
|
||||
X = x;
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include "cursormanager.h"
|
||||
#include "editbuffer.h"
|
||||
#include "editcoordsys.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class CropWindow;
|
||||
|
||||
@@ -45,7 +46,7 @@ public:
|
||||
};
|
||||
|
||||
class ImageArea;
|
||||
class CropWindow : public LWButtonListener, public CropDisplayHandler, public EditCoordSystem, public ObjectMOBuffer
|
||||
class CropWindow : public LWButtonListener, public CropDisplayHandler, public EditCoordSystem, public ObjectMOBuffer, public rtengine::NonCopyable
|
||||
{
|
||||
static bool initialized;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "editcallbacks.h"
|
||||
#include "mydiagonalcurve.h"
|
||||
#include "myflatcurve.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class CurveEditorGroup;
|
||||
class CurveEditorSubGroup;
|
||||
@@ -38,7 +39,7 @@ class CurveEditorSubGroup;
|
||||
/** @brief This class is an interface between RT and the curve editor group
|
||||
* It handles the methods related to a specific curve. It is created by CurveEditorGroup::addCurve
|
||||
*/
|
||||
class CurveEditor : public EditSubscriber
|
||||
class CurveEditor : public EditSubscriber, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
friend class CurveEditorGroup;
|
||||
|
@@ -21,10 +21,11 @@
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include "curveeditorgroup.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class DiagonalCurveEditor;
|
||||
|
||||
class DiagonalCurveEditorSubGroup : public CurveEditorSubGroup, public SHCListener, public AdjusterListener
|
||||
class DiagonalCurveEditorSubGroup : public CurveEditorSubGroup, public SHCListener, public AdjusterListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
friend class DiagonalCurveEditor;
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "navigator.h"
|
||||
#include "progressconnector.h"
|
||||
#include "filepanel.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class EditorPanel;
|
||||
class MyProgressBar;
|
||||
@@ -52,7 +53,8 @@ class EditorPanel final :
|
||||
public rtengine::ProgressListener,
|
||||
public ThumbnailListener,
|
||||
public HistoryBeforeLineListener,
|
||||
public rtengine::HistogramListener
|
||||
public rtengine::HistogramListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
explicit EditorPanel (FilePanel* filePanel = nullptr);
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "exportpanel.h"
|
||||
#include "extprog.h"
|
||||
#include "profilestorecombobox.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class ProfileStoreLabel;
|
||||
class FileBrowser;
|
||||
@@ -56,7 +57,8 @@ public:
|
||||
class FileBrowser : public ThumbBrowserBase,
|
||||
public LWButtonListener,
|
||||
public ExportPanelListener,
|
||||
public ProfileStoreListener
|
||||
public ProfileStoreListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
private:
|
||||
typedef sigc::signal<void> type_trash_changed;
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "thumbimageupdater.h"
|
||||
#include "thumbnail.h"
|
||||
#include "thumbnaillistener.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
|
||||
class FileBrowserEntry;
|
||||
@@ -46,7 +47,8 @@ struct FileBrowserEntryIdleHelper {
|
||||
class FileThumbnailButtonSet;
|
||||
class FileBrowserEntry : public ThumbBrowserEntryBase,
|
||||
public ThumbnailListener,
|
||||
public ThumbImageUpdateListener
|
||||
public ThumbImageUpdateListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
double scale;
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "previewloader.h"
|
||||
#include "multilangmgr.h"
|
||||
#include "threadutils.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class FilePanel;
|
||||
/*
|
||||
@@ -44,7 +45,8 @@ class FileCatalog : public Gtk::VBox,
|
||||
public PreviewLoaderListener,
|
||||
public FilterPanelListener,
|
||||
public FileBrowserListener,
|
||||
public ExportPanelListener
|
||||
public ExportPanelListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
typedef sigc::slot<void, const Glib::ustring&> DirSelectionSlot;
|
||||
|
@@ -31,12 +31,14 @@
|
||||
#include "filterpanel.h"
|
||||
#include "exportpanel.h"
|
||||
#include "progressconnector.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class RTWindow;
|
||||
|
||||
class FilePanel final :
|
||||
public Gtk::HPaned,
|
||||
public FileSelectionListener
|
||||
public FileSelectionListener,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
FilePanel ();
|
||||
|
@@ -28,8 +28,6 @@
|
||||
#include "toolpanel.h"
|
||||
#include "wbprovider.h"
|
||||
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class FilmNegProvider
|
||||
{
|
||||
public:
|
||||
@@ -39,7 +37,6 @@ public:
|
||||
};
|
||||
|
||||
class FilmNegative :
|
||||
public rtengine::NonCopyable,
|
||||
public ToolParamBlock,
|
||||
public AdjusterListener,
|
||||
public FoldableToolPanel,
|
||||
|
@@ -21,10 +21,11 @@
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include "curveeditorgroup.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class FlatCurveEditor;
|
||||
|
||||
class FlatCurveEditorSubGroup: public CurveEditorSubGroup
|
||||
class FlatCurveEditorSubGroup: public CurveEditorSubGroup, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
friend class FlatCurveEditor;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "guiutils.h"
|
||||
|
||||
#include "pointermotionlistener.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class HistogramArea;
|
||||
struct HistogramAreaIdleHelper {
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
double log (double vsize, double val);
|
||||
};
|
||||
|
||||
class HistogramRGBArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling
|
||||
class HistogramRGBArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable
|
||||
{
|
||||
private:
|
||||
typedef const double (*TMatrix)[3];
|
||||
@@ -114,7 +115,7 @@ public:
|
||||
virtual void toggleButtonMode() = 0;
|
||||
};
|
||||
|
||||
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling
|
||||
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling, public rtengine::NonCopyable
|
||||
{
|
||||
public:
|
||||
typedef sigc::signal<void, double> type_signal_factor_changed;
|
||||
@@ -172,7 +173,7 @@ private:
|
||||
void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const override;
|
||||
};
|
||||
|
||||
class HistogramPanel : public Gtk::Grid, public PointerMotionListener, public DrawModeListener
|
||||
class HistogramPanel : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
protected:
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "../rtengine/LUT.h"
|
||||
#include "guiutils.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
#define RADIUS 3.5 /** radius of the control points ; must be x.5 to target the center of a pixel */
|
||||
#define CBAR_WIDTH 10 /** inner width of the colored bar (border excluded) */
|
||||
@@ -55,7 +56,7 @@ enum SnapToType {
|
||||
class MyCurveIdleHelper;
|
||||
class CurveEditor;
|
||||
|
||||
class MyCurve : public Gtk::DrawingArea, public BackBuffer, public ColorCaller, public CoordinateProvider
|
||||
class MyCurve : public Gtk::DrawingArea, public BackBuffer, public ColorCaller, public CoordinateProvider, public rtengine::NonCopyable
|
||||
{
|
||||
friend class MyCurveIdleHelper;
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "guiutils.h"
|
||||
|
||||
#include "../rtengine/rtengine.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class PreviewListener
|
||||
{
|
||||
@@ -44,7 +45,7 @@ struct PreviewHandlerIdleHelper {
|
||||
int pending;
|
||||
};
|
||||
|
||||
class PreviewHandler : public rtengine::PreviewImageListener
|
||||
class PreviewHandler : public rtengine::PreviewImageListener, public rtengine::NonCopyable
|
||||
{
|
||||
private:
|
||||
friend int setImageUI (void* data);
|
||||
|
@@ -28,8 +28,9 @@
|
||||
#include "guiutils.h"
|
||||
#include "profilestorecombobox.h"
|
||||
#include "rtimage.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class ProfilePanel : public Gtk::Grid, public PParamsChangeListener, public ProfileStoreListener
|
||||
class ProfilePanel : public Gtk::Grid, public PParamsChangeListener, public ProfileStoreListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
private:
|
||||
|
@@ -29,8 +29,9 @@
|
||||
#if defined(__APPLE__)
|
||||
#include <gtkosxapplication.h>
|
||||
#endif
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class RTWindow : public Gtk::Window, public rtengine::ProgressListener
|
||||
class RTWindow : public Gtk::Window, public rtengine::ProgressListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
private:
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "adjuster.h"
|
||||
#include "guiutils.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class FormatChangeListener
|
||||
{
|
||||
@@ -31,7 +32,7 @@ public:
|
||||
virtual void formatChanged(const Glib::ustring& format) = 0;
|
||||
};
|
||||
|
||||
class SaveFormatPanel : public Gtk::Grid, public AdjusterListener
|
||||
class SaveFormatPanel : public Gtk::Grid, public AdjusterListener, public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
protected:
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "guiutils.h"
|
||||
#include "multilangmgr.h"
|
||||
#include "paramsedited.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class ToolPanel;
|
||||
class FoldableToolPanel;
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
ToolParamBlock();
|
||||
};
|
||||
|
||||
class ToolPanel
|
||||
class ToolPanel : public rtengine::NonCopyable
|
||||
{
|
||||
|
||||
protected:
|
||||
|
@@ -83,6 +83,7 @@
|
||||
#include "dehaze.h"
|
||||
#include "guiutils.h"
|
||||
#include "filmnegative.h"
|
||||
#include "../rtengine/noncopyable.h"
|
||||
|
||||
class ImageEditorCoordinator;
|
||||
|
||||
@@ -99,7 +100,8 @@ class ToolPanelCoordinator :
|
||||
public ICMPanelListener,
|
||||
public ImageAreaToolListener,
|
||||
public rtengine::ImageTypeListener,
|
||||
public FilmNegProvider
|
||||
public FilmNegProvider,
|
||||
public rtengine::NonCopyable
|
||||
{
|
||||
protected:
|
||||
WhiteBalance* whitebalance;
|
||||
|
Reference in New Issue
Block a user