From 0731975ff08e0d57e5c40ef69554dd68eb4bc6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 17:48:40 +0200 Subject: [PATCH 1/7] Apply `modernize-use-nullptr` Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;` --- rtengine/EdgePreservingDecomposition.cc | 26 +- rtengine/EdgePreservingDecomposition.h | 8 +- rtengine/PF_correct_RT.cc | 4 +- rtengine/alignedbuffer.h | 8 +- rtengine/array2D.h | 12 +- rtengine/cache.h | 2 +- rtengine/camconst.cc | 38 +- rtengine/cieimage.cc | 2 +- rtengine/color.cc | 4 +- rtengine/cplx_wavelet_dec.cc | 2 +- rtengine/cplx_wavelet_dec.h | 8 +- rtengine/cplx_wavelet_level.h | 2 +- rtengine/dcraw.cc | 22 +- rtengine/dcraw.h | 10 +- rtengine/dcrop.cc | 48 +-- rtengine/demosaic_algos.cc | 24 +- rtengine/dfmanager.cc | 34 +- rtengine/dfmanager.h | 4 +- rtengine/ffmanager.cc | 28 +- rtengine/ffmanager.h | 4 +- rtengine/iccjpeg.cc | 8 +- rtengine/iccstore.cc | 32 +- rtengine/iccstore.h | 2 +- rtengine/iimage.h | 28 +- rtengine/image16.h | 2 +- rtengine/image8.cc | 4 +- rtengine/image8.h | 2 +- rtengine/imagedata.cc | 20 +- rtengine/imagedata.h | 2 +- rtengine/imagefloat.cc | 4 +- rtengine/imagefloat.h | 2 +- rtengine/imageio.cc | 62 +-- rtengine/imageio.h | 8 +- rtengine/imagesource.h | 4 +- rtengine/improccoordinator.cc | 28 +- rtengine/improccoordinator.h | 2 +- rtengine/improcfun.h | 16 +- rtengine/init.cc | 2 +- rtengine/iplab2rgb.cc | 6 +- rtengine/iptransform.cc | 8 +- rtengine/ipvibrance.cc | 10 +- rtengine/ipwavelet.cc | 26 +- rtengine/jdatasrc.cc | 12 +- rtengine/jpeg_memsrc.cc | 2 +- rtengine/klt/klt.cc | 32 +- rtengine/klt/klt_util.cc | 2 +- rtengine/klt/pnmio.cc | 14 +- rtengine/klt/pyramid.cc | 2 +- rtengine/klt/selectGoodFeatures.cc | 18 +- rtengine/klt/trackFeatures.cc | 44 +- rtengine/klt/writeFeatures.cc | 58 +-- rtengine/lcp.cc | 26 +- rtengine/loadinitial.cc | 4 +- rtengine/myfile.cc | 18 +- rtengine/pipettebuffer.cc | 22 +- rtengine/previewimage.cc | 8 +- rtengine/processingjob.h | 2 +- rtengine/procparams.cc | 14 +- rtengine/procparams.h | 8 +- rtengine/rawimage.cc | 34 +- rtengine/rawimage.h | 2 +- rtengine/rawimagesource.cc | 74 ++-- rtengine/rawimagesource.h | 2 +- rtengine/rtengine.h | 4 +- rtengine/simpleprocess.cc | 38 +- rtengine/stdimagesource.cc | 24 +- rtengine/stdimagesource.h | 2 +- rtexif/canonattribs.cc | 326 +++++++------- rtexif/fujiattribs.cc | 76 ++-- rtexif/kodakattribs.cc | 54 +-- rtexif/nikonattribs.cc | 172 ++++---- rtexif/olympusattribs.cc | 548 ++++++++++++------------ rtexif/pentaxattribs.cc | 370 ++++++++-------- rtexif/rtexif.cc | 164 +++---- rtexif/rtexif.h | 6 +- rtexif/sonyminoltaattribs.cc | 394 ++++++++--------- rtexif/stdattribs.cc | 506 +++++++++++----------- rtgui/adjuster.cc | 26 +- rtgui/adjuster.h | 4 +- rtgui/batchqueue.cc | 12 +- rtgui/batchqueueentry.cc | 10 +- rtgui/batchqueueentry.h | 2 +- rtgui/batchqueuepanel.cc | 4 +- rtgui/batchtoolpanelcoord.cc | 10 +- rtgui/batchtoolpanelcoord.h | 8 +- rtgui/bayerpreprocess.h | 6 +- rtgui/bayerprocess.h | 6 +- rtgui/bayerrawexposure.h | 6 +- rtgui/blackwhite.cc | 2 +- rtgui/blackwhite.h | 6 +- rtgui/bqentryupdater.cc | 8 +- rtgui/bqentryupdater.h | 2 +- rtgui/cacorrection.h | 6 +- rtgui/chmixer.h | 6 +- rtgui/clipboard.cc | 6 +- rtgui/coarsepanel.h | 4 +- rtgui/colorappearance.h | 6 +- rtgui/coloredbar.cc | 2 +- rtgui/colorprovider.h | 2 +- rtgui/colortoning.cc | 8 +- rtgui/colortoning.h | 6 +- rtgui/coordinateadjuster.cc | 2 +- rtgui/coordinateadjuster.h | 2 +- rtgui/crop.cc | 2 +- rtgui/crop.h | 4 +- rtgui/crophandler.cc | 32 +- rtgui/cropwindow.cc | 16 +- rtgui/curveeditor.cc | 8 +- rtgui/curveeditorgroup.cc | 18 +- rtgui/curveeditorgroup.h | 2 +- rtgui/darkframe.h | 4 +- rtgui/defringe.h | 6 +- rtgui/diagonalcurveeditorsubgroup.cc | 36 +- rtgui/dirbrowser.cc | 2 +- rtgui/dirpyrdenoise.cc | 4 +- rtgui/dirpyrdenoise.h | 6 +- rtgui/dirpyrequalizer.h | 6 +- rtgui/distortion.cc | 2 +- rtgui/distortion.h | 6 +- rtgui/edit.cc | 10 +- rtgui/editorpanel.cc | 64 +-- rtgui/editorpanel.h | 4 +- rtgui/epd.h | 6 +- rtgui/exifpanel.cc | 4 +- rtgui/exifpanel.h | 6 +- rtgui/exportpanel.cc | 2 +- rtgui/extprog.cc | 2 +- rtgui/filebrowser.cc | 52 +-- rtgui/filebrowserentry.cc | 16 +- rtgui/filecatalog.cc | 12 +- rtgui/filepanel.cc | 4 +- rtgui/filmsimulation.h | 4 +- rtgui/filterpanel.cc | 2 +- rtgui/flatcurveeditorsubgroup.cc | 16 +- rtgui/flatfield.h | 6 +- rtgui/gradient.h | 6 +- rtgui/guiutils.cc | 20 +- rtgui/guiutils.h | 8 +- rtgui/histogrampanel.h | 2 +- rtgui/history.cc | 2 +- rtgui/history.h | 2 +- rtgui/hsvequalizer.h | 4 +- rtgui/icmpanel.cc | 8 +- rtgui/icmpanel.h | 6 +- rtgui/imagearea.cc | 38 +- rtgui/imageareapanel.cc | 2 +- rtgui/imageareatoollistener.h | 10 +- rtgui/impulsedenoise.h | 6 +- rtgui/indclippedpanel.cc | 2 +- rtgui/inspector.cc | 18 +- rtgui/iptcpanel.h | 6 +- rtgui/labcurve.cc | 4 +- rtgui/labcurve.h | 6 +- rtgui/lensgeom.cc | 2 +- rtgui/lensgeom.h | 4 +- rtgui/lensprofile.h | 4 +- rtgui/lwbutton.cc | 2 +- rtgui/main.cc | 12 +- rtgui/mycurve.cc | 12 +- rtgui/options.cc | 6 +- rtgui/partialpastedlg.h | 2 +- rtgui/pcvignette.h | 6 +- rtgui/perspective.h | 6 +- rtgui/popupcommon.cc | 4 +- rtgui/pparamschangelistener.h | 2 +- rtgui/preferences.cc | 12 +- rtgui/preprocess.h | 4 +- rtgui/previewhandler.cc | 4 +- rtgui/previewloader.cc | 6 +- rtgui/previewmodepanel.cc | 4 +- rtgui/previewwindow.cc | 2 +- rtgui/profilechangelistener.h | 2 +- rtgui/profilepanel.cc | 32 +- rtgui/profilepanel.h | 2 +- rtgui/profilestore.cc | 32 +- rtgui/profilestore.h | 2 +- rtgui/progressconnector.h | 4 +- rtgui/prsharpening.h | 6 +- rtgui/rawcacorrection.h | 6 +- rtgui/rawexposure.h | 6 +- rtgui/renamedlg.cc | 2 +- rtgui/resize.cc | 2 +- rtgui/resize.h | 6 +- rtgui/retinex.cc | 4 +- rtgui/retinex.h | 6 +- rtgui/rgbcurves.h | 4 +- rtgui/rotate.cc | 2 +- rtgui/rotate.h | 6 +- rtgui/rtwindow.cc | 26 +- rtgui/saveformatpanel.cc | 4 +- rtgui/shadowshighlights.h | 6 +- rtgui/sharpenedge.h | 6 +- rtgui/sharpening.h | 6 +- rtgui/sharpenmicro.h | 6 +- rtgui/shcselector.cc | 2 +- rtgui/splash.cc | 10 +- rtgui/splash.h | 2 +- rtgui/thresholdadjuster.cc | 10 +- rtgui/thresholdselector.cc | 4 +- rtgui/thumbbrowserbase.cc | 6 +- rtgui/thumbbrowserentrybase.cc | 8 +- rtgui/thumbimageupdater.cc | 10 +- rtgui/thumbnail.cc | 46 +- rtgui/thumbnail.h | 6 +- rtgui/tonecurve.h | 6 +- rtgui/toolbar.cc | 2 +- rtgui/toolpanel.cc | 2 +- rtgui/toolpanel.h | 22 +- rtgui/toolpanelcoord.cc | 12 +- rtgui/toolpanelcoord.h | 8 +- rtgui/vibrance.h | 6 +- rtgui/vignetting.h | 6 +- rtgui/wavelet.cc | 18 +- rtgui/wavelet.h | 6 +- rtgui/whitebalance.cc | 4 +- rtgui/whitebalance.h | 6 +- rtgui/xtransprocess.h | 6 +- rtgui/xtransrawexposure.h | 6 +- 218 files changed, 2406 insertions(+), 2406 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 927bfac2d..c8ba8f9d8 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -27,7 +27,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl float *r = (float*)(buffer + 64); //Start r and x. - if(x == NULL) { + if(x == nullptr) { x = new float[n]; memset(x, 0, sizeof(float)*n); //Zero initial guess if x == NULL. @@ -46,7 +46,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //s is preconditionment of r. Without, direct to r. float *s = r, rs = 0.0f; - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { s = new float[n]; Preconditioner(s, r, Pass); @@ -114,7 +114,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl break; } - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { Preconditioner(s, r, Pass); } @@ -187,7 +187,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu { n = Dimension; m = NumberOfDiagonalsInLowerTriangle; - IncompleteCholeskyFactorization = NULL; + IncompleteCholeskyFactorization = nullptr; Diagonals = new float *[m]; StartRows = new int [m + 1]; @@ -198,7 +198,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu MultiDiagonalSymmetricMatrix::~MultiDiagonalSymmetricMatrix() { - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { free(buffer); } else for(int i = 0; i < m; i++) { @@ -218,10 +218,10 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) if(index == 0) { buffer = (char*)calloc( (n + padding) * m * sizeof(float) + (m + 16) * 64 + 63, 1); - if(buffer == NULL) + if(buffer == nullptr) // no big memory block available => try to allocate smaller blocks { - DiagBuffer = NULL; + DiagBuffer = nullptr; } else { DiagBuffer = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); } @@ -238,12 +238,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) return false; } - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { Diagonals[index] = (float*)(DiagBuffer + (index * (n + padding) * sizeof(float)) + ((index + 16) * 64)); } else { Diagonals[index] = new float[DiagonalLength(StartRow)]; - if(Diagonals[index] == NULL) { + if(Diagonals[index] == nullptr) { printf("Error in MultiDiagonalSymmetricMatrix::CreateDiagonal: memory allocation failed. Out of memory?\n"); return false; } @@ -675,7 +675,7 @@ EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) A->CreateDiagonal(3, w) && A->CreateDiagonal(4, w + 1))) { delete A; - A = NULL; + A = nullptr; printf("Error in EdgePreservingDecomposition construction: out of memory.\n"); } else { a0 = A->Diagonals[0]; @@ -694,7 +694,7 @@ EdgePreservingDecomposition::~EdgePreservingDecomposition() SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) { - if(Blur == NULL) + if(Blur == nullptr) UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. Blur = new float[n]; @@ -868,7 +868,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal } //Create a blur here, initialize. - if(Blur == NULL) { + if(Blur == nullptr) { Blur = new float[n]; } @@ -927,7 +927,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). float *u = CreateIteratedBlur(Source, Scale, EdgeStopping, Iterates, Reweightings); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = u; } diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index a15cacb62..944e0ec7f 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -72,7 +72,7 @@ ben_s or nonbasketless. Enjoy! #include "noncopyable.h" //This is for solving big symmetric positive definite linear problems. -float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = NULL, float RMSResidual = 0.0f, void *Pass = NULL, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = NULL); +float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = nullptr, float RMSResidual = 0.0f, void *Pass = nullptr, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = nullptr); //Storage and use class for symmetric matrices, the nonzero contents of which are confined to diagonals. class MultiDiagonalSymmetricMatrix : @@ -143,16 +143,16 @@ public: //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); + float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = nullptr, bool UseBlurForEdgeStop = false); //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = NULL); + float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = nullptr); /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = NULL); + float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = nullptr); private: MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 6864e28ec..6808fd4eb 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -47,7 +47,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); @@ -289,7 +289,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * ds { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index 652bfe8cf..44fd43e81 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -43,7 +43,7 @@ public: * @param size Number of elements of size T to allocate, i.e. allocated size will be sizeof(T)*size ; set it to 0 if you want to defer the allocation * @param align Expressed in bytes; SSE instructions need 128 bits alignment, which mean 16 bytes, which is the default value */ - AlignedBuffer (size_t size = 0, size_t align = 16) : real(NULL), alignment(align), allocatedSize(0), unitSize(0), data(NULL), inUse(false) + AlignedBuffer (size_t size = 0, size_t align = 16) : real(nullptr), alignment(align), allocatedSize(0), unitSize(0), data(nullptr), inUse(false) { if (size) { resize(size); @@ -78,8 +78,8 @@ public: free(real); } - real = NULL; - data = NULL; + real = nullptr; + data = nullptr; inUse = false; allocatedSize = 0; unitSize = 0; @@ -117,7 +117,7 @@ public: } else { allocatedSize = 0; unitSize = 0; - data = NULL; + data = nullptr; inUse = false; return false; } diff --git a/rtengine/array2D.h b/rtengine/array2D.h index db44fcfc8..d9cfb23e2 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -82,19 +82,19 @@ private: { if ((ptr) && ((h > y) || (4 * h < y))) { delete[] ptr; - ptr = NULL; + ptr = nullptr; } if ((data) && (((h * w) > (x * y)) || ((h * w) < ((x * y) / 4)))) { delete[] data; - data = NULL; + data = nullptr; } - if (ptr == NULL) { + if (ptr == nullptr) { ptr = new T*[h]; } - if (data == NULL) { + if (data == nullptr) { data = new T[h * w + offset]; } @@ -112,7 +112,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0) + x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0) { //printf("got empty array2D init\n"); } @@ -150,7 +150,7 @@ public: if (owner) { data = new T[h * w]; } else { - data = NULL; + data = nullptr; } x = w; diff --git a/rtengine/cache.h b/rtengine/cache.h index ea567542c..f4c232673 100644 --- a/rtengine/cache.h +++ b/rtengine/cache.h @@ -64,7 +64,7 @@ public: virtual void onDestroy() = 0; }; - Cache(unsigned long _size, Hook* _hook = 0) : + Cache(unsigned long _size, Hook* _hook = nullptr) : store_size(_size), hook(_hook) { diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index c7a6412be..3e7ad6202 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -41,7 +41,7 @@ CameraConst::parseApertureScaling(CameraConst *cc, void *ji_) return false; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { cJSON *js = cJSON_GetObjectItem(ji, "aperture"); if (!js) { @@ -90,7 +90,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) int i; cJSON *js; - for (js = ji->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = ji->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { lvl.levels[i] = js->valueint; } @@ -98,7 +98,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -107,7 +107,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) return true; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { int iso[1000] = { 0 }; int iso_count = 0; cJSON *js = cJSON_GetObjectItem(ji, "iso"); @@ -121,7 +121,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 1000; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 1000; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"iso\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -150,7 +150,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -163,7 +163,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -183,7 +183,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) CameraConst * CameraConst::parseEntry(void *cJSON_, const char *make_model) { - CameraConst *cc = 0; + CameraConst *cc = nullptr; cJSON *js, *ji, *jranges; js = (cJSON *)cJSON_; @@ -200,7 +200,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 12 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 12 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"dcraw_matrix\" array must contain numbers\n"); goto parse_error; @@ -220,7 +220,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"raw_crop\" array must contain numbers\n"); goto parse_error; @@ -229,7 +229,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) cc->raw_crop[i] = ji->valueint; } - if (i != 4 || ji != NULL) { + if (i != 4 || ji != nullptr) { fprintf(stderr, "\"raw_crop\" must contain 4 numbers\n"); goto parse_error; } @@ -245,7 +245,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 8 * 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 8 * 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"masked_areas\" array must contain numbers\n"); goto parse_error; @@ -317,7 +317,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) return cc; parse_error: - return 0; + return nullptr; } bool @@ -342,7 +342,7 @@ const short * CameraConst::get_dcrawMatrix(void) { if (!has_dcrawMatrix()) { - return 0; + return nullptr; } return dcraw_matrix; @@ -545,7 +545,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) const char *filename = filename_.c_str(); FILE *stream = fopen(filename, "rt"); - if (stream == NULL) { + if (stream == nullptr) { fprintf(stderr, "Could not open camera constants file \"%s\": %s\n", filename, strerror(errno)); return false; } @@ -614,7 +614,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) goto parse_error; } - for (js = js->child; js != NULL; js = js->next) { + for (js = js->child; js != nullptr; js = js->next) { cJSON *ji = cJSON_GetObjectItem(js, "make_model"); if (!ji) { @@ -629,7 +629,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) is_array = true; } - while (ji != NULL) { + while (ji != nullptr) { if (ji->type != cJSON_String) { fprintf(stderr, "\"make_model\" must be a string or an array of strings\n"); goto parse_error; @@ -667,7 +667,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) if (is_array) { ji = ji->next; } else { - ji = NULL; + ji = nullptr; } } } @@ -715,7 +715,7 @@ CameraConstantsStore::get(const char make[], const char model[]) it = mCameraConstants.find(key); if (it == mCameraConstants.end()) { - return 0; + return nullptr; } return it->second; diff --git a/rtengine/cieimage.cc b/rtengine/cieimage.cc index 87954e1f0..be122febf 100644 --- a/rtengine/cieimage.cc +++ b/rtengine/cieimage.cc @@ -15,7 +15,7 @@ CieImage::CieImage (int w, int h) : fromImage(false), W(w), H(h) // Initialize the pointers to zero for (unsigned int c = 0; c < 6; ++c) { - data[c] = NULL; + data[c] = nullptr; } // Trying to allocate all in one block diff --git a/rtengine/color.cc b/rtengine/color.cc index a23a261b7..b0250ce9c 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -350,7 +350,7 @@ void Color::init () #ifdef _OPENMP #pragma omp section #endif - linearGammaTRC = cmsBuildGamma(NULL, 1.0); + linearGammaTRC = cmsBuildGamma(nullptr, 1.0); } } @@ -2638,7 +2638,7 @@ SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, MyTime t1e, t2e; t1e.set(); int negat = 0, moreRGB = 0; - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (corMunsell) { MunsDebugInfo = new MunsellDebugInfo(); diff --git a/rtengine/cplx_wavelet_dec.cc b/rtengine/cplx_wavelet_dec.cc index d9e72e6c5..eafadaa54 100644 --- a/rtengine/cplx_wavelet_dec.cc +++ b/rtengine/cplx_wavelet_dec.cc @@ -26,7 +26,7 @@ namespace rtengine wavelet_decomposition::~wavelet_decomposition() { for(int i = 0; i <= lvltot; i++) { - if(wavelet_decomp[i] != NULL) { + if(wavelet_decomp[i] != nullptr) { delete wavelet_decomp[i]; } } diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index bc8b7bdd3..40639e7ea 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -97,7 +97,7 @@ public: template wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop, int numThreads, int Daub4Len) - : coeff0(NULL), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) + : coeff0(nullptr), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) { //initialize wavelet filters @@ -219,7 +219,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpLo = wavelet_decomp[lvl]->wavcoeffs[2]; // we can use this as buffer wavelet_decomp[lvl]->reconstruct_level(tmpLo, tmpHi, coeff0, coeff0, wavfilt_synth, wavfilt_synth, wavfilt_len, wavfilt_offset); delete wavelet_decomp[lvl]; - wavelet_decomp[lvl] = NULL; + wavelet_decomp[lvl] = nullptr; } delete[] tmpHi; @@ -261,9 +261,9 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) delete[] tmpHi; delete wavelet_decomp[0]; - wavelet_decomp[0] = NULL; + wavelet_decomp[0] = nullptr; delete[] coeff0; - coeff0 = NULL; + coeff0 = nullptr; } }; diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index cbdb5a481..5c13158b8 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -189,7 +189,7 @@ void wavelet_level::destroy(T ** subbands) delete[] subbands[1]; } else { for(int j = 1; j < 4; j++) { - if(subbands[j] != NULL) { + if(subbands[j] != nullptr) { delete[] subbands[j]; } } diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 3593f2777..8acfd6187 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=0, (*ip)[4]; + short *rp=nullptr, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=0; + ushort *pixel=nullptr; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return 0; + return nullptr; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return 0; + return nullptr; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4155,7 +4155,7 @@ void CLASS remove_zeroes() */ void CLASS bad_pixels (const char *cfname) { - FILE *fp=0; + FILE *fp=nullptr; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; @@ -4430,7 +4430,7 @@ void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) void CLASS wavelet_denoise() { - float *fimg=0, *temp, thold, mul[2], avg, diff; + float *fimg=nullptr, *temp, thold, mul[2], avg, diff; int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=0, *pix; + ushort *img=nullptr, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -4748,7 +4748,7 @@ void CLASS xtrans_interpolate (int passes) if (verbose) fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - cielab (0,0); + cielab (nullptr,nullptr); ndir = 4 << (passes > 1); buffer = (char *) malloc (TS*TS*(ndir*11+6)); merror (buffer, "xtrans_interpolate()"); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; + load_raw = thumb_load_raw = nullptr; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } goto dng_skip; } diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 405f202bd..666b4276f 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -43,13 +43,13 @@ public: :exif_base(-1) ,ciff_base(-1) ,ciff_len(0) - ,ifp(NULL),ofp(NULL) + ,ifp(nullptr),ofp(nullptr) ,order(0x4949) - ,ifname(NULL) - ,meta_data(NULL) + ,ifname(nullptr) + ,meta_data(nullptr) ,shot_select(0),multi_out(0) - ,float_raw_image(NULL) - ,image(NULL) + ,float_raw_image(nullptr) + ,image(nullptr) ,bright(1.),threshold(0.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index ac8b6fc0e..22c5f91d9 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -31,15 +31,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(NULL), laboCrop(NULL), labnCrop(NULL), - cropImg(NULL), cbuf_real(NULL), cshmap(NULL), transCrop(NULL), cieCrop(NULL), cbuffer(NULL), + : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), + cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), updating(false), newUpdatePending(false), skip(10), padding(0), cropx(0), cropy(0), cropw(-1), croph(-1), trafx(0), trafy(0), trafw(-1), trafh(-1), rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), borderRequested(32), upperBorder(0), leftBorder(0), cropAllocated(false), - cropImageListener(NULL), parent(parent), isDetailWindow(isDetailWindow) + cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) { parent->crops.push_back (this); } @@ -77,7 +77,7 @@ void Crop::setListener (DetailedCropListener* il) EditUniqueID Crop::getCurrEditID() { - EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; return subscriber ? subscriber->getEditID() : EUID_None; } @@ -90,17 +90,17 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) MyMutex::MyLock lock(cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber - EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; - if (newSubscriber == NULL || (oldSubscriber != NULL && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { - if (PipetteBuffer::imgFloatBuffer != NULL) { + if (newSubscriber == nullptr || (oldSubscriber != nullptr && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { + if (PipetteBuffer::imgFloatBuffer != nullptr) { delete PipetteBuffer::imgFloatBuffer; - PipetteBuffer::imgFloatBuffer = NULL; + PipetteBuffer::imgFloatBuffer = nullptr; } - if (PipetteBuffer::LabBuffer != NULL) { + if (PipetteBuffer::LabBuffer != nullptr) { delete PipetteBuffer::LabBuffer; - PipetteBuffer::LabBuffer = NULL; + PipetteBuffer::LabBuffer = nullptr; } if (PipetteBuffer::singlePlaneBuffer.getW() != -1) { @@ -164,7 +164,7 @@ void Crop::update (int todo) // printf("x=%d y=%d crow=%d croh=%d skip=%d\n",rqcropx, rqcropy, rqcropw, rqcroph, skip); // printf("trafx=%d trafyy=%d trafwsk=%d trafHs=%d \n",trafx, trafy, trafw*skip, trafh*skip); - Imagefloat *calclum = NULL;//for Luminance denoise curve + Imagefloat *calclum = nullptr;//for Luminance denoise curve NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; float autoNR = (float) settings->nrauto;// @@ -696,7 +696,7 @@ void Crop::update (int todo) delete transCrop; } - transCrop = NULL; + transCrop = nullptr; } if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { @@ -955,7 +955,7 @@ void Crop::update (int todo) delete cieCrop; } - cieCrop = NULL; + cieCrop = nullptr; } } @@ -1018,47 +1018,47 @@ void Crop::freeAll () if (cropAllocated) { if (origCrop ) { delete origCrop; - origCrop = NULL; + origCrop = nullptr; } if (transCrop) { delete transCrop; - transCrop = NULL; + transCrop = nullptr; } if (laboCrop ) { delete laboCrop; - laboCrop = NULL; + laboCrop = nullptr; } if (labnCrop ) { delete labnCrop; - labnCrop = NULL; + labnCrop = nullptr; } if (cropImg ) { delete cropImg; - cropImg = NULL; + cropImg = nullptr; } if (cieCrop ) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuf_real) { delete [] cbuf_real; - cbuf_real = NULL; + cbuf_real = nullptr; } if (cbuffer ) { delete [] cbuffer; - cbuffer = NULL; + cbuffer = nullptr; } if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } PipetteBuffer::flush(); @@ -1179,7 +1179,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuffer ) { @@ -1192,7 +1192,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } cbuffer = new float*[croph]; diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 405a34118..0d85db8b8 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -104,8 +104,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_g (gh[0], gv[0], 0); interpolate_row_g (gh[1], gv[1], 1); interpolate_row_g (gh[2], gv[2], 2); - interpolate_row_rb (rh[0], bh[0], NULL, gh[0], gh[1], 0); - interpolate_row_rb (rv[0], bv[0], NULL, gv[0], gv[1], 0); + interpolate_row_rb (rh[0], bh[0], nullptr, gh[0], gh[1], 0); + interpolate_row_rb (rv[0], bv[0], nullptr, gv[0], gv[1], 0); interpolate_row_rb (rh[1], bh[1], gh[0], gh[1], gh[2], 1); interpolate_row_rb (rv[1], bv[1], gv[0], gv[1], gv[2], 1); @@ -138,8 +138,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], gh[(i + 2) % 4], i + 1); interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], gv[(i + 2) % 4], i + 1); } else { - interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], NULL, i + 1); - interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], NULL, i + 1); + interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], nullptr, i + 1); + interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], nullptr, i + 1); } convert_to_cielab_row (rh[(i + 1) % 3], gh[(i + 1) % 4], bh[(i + 1) % 3], lLh[(i + 1) % 3], lah[(i + 1) % 3], lbh[(i + 1) % 3]); @@ -285,9 +285,9 @@ void RawImageSource::eahd_demosaic () // Interpolate R and B for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -550,9 +550,9 @@ void RawImageSource::hphd_demosaic () for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -861,9 +861,9 @@ void RawImageSource::vng4_demosaic () // rm, gm, bm must be recovered //interpolate_row_rb_mul_pp (red, blue, NULL, green[i], green[i+1], i, rm, gm, bm, 0, W, 1); { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -1368,7 +1368,7 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int i float *qix[5]; float *buffer = (float *)calloc(rr1 * cc1 * 5 * sizeof(float), 1); - if(buffer == NULL) { // allocation of big block of memory failed, try to get 5 smaller ones + if(buffer == nullptr) { // allocation of big block of memory failed, try to get 5 smaller ones printf("lmmse_interpolate_omp: allocation of big memory block failed, try to get 5 smaller ones now...\n"); bool allocationFailed = false; @@ -4047,7 +4047,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) double progressInc = 36.0 * (1.0 - progress) / ((H * W) / ((ts - 16) * (ts - 16))); const int ndir = 4 << (passes > 1); - cielab (0, 0, 0, 0, 0, 0, 0, 0); + cielab (nullptr, nullptr, nullptr, nullptr, 0, 0, 0, nullptr); struct s_minmaxgreen { float min; float max; diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e06ac27e2..347b96792 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -45,7 +45,7 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } return *this; @@ -138,7 +138,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -200,7 +200,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -332,11 +332,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -344,11 +344,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info && info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -359,14 +359,14 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } RawImage ri (filename); int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } dfList_t::iterator iter; @@ -406,7 +406,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch(Gio::Error&) {} - return 0; + return nullptr; } void DFManager::getStat( int &totFiles, int &totTemplates) @@ -433,7 +433,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t ) { if( dfList.empty() ) { - return 0; + return nullptr; } std::string key( dfInfo::key(mak, mod, isospeed, shut) ); @@ -467,7 +467,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -478,7 +478,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string if( df ) { return df->getRawImage(); } else { - return 0; + return nullptr; } } @@ -496,7 +496,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) return df->getRawImage(); } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { @@ -506,7 +506,7 @@ std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) } } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t ) { @@ -525,7 +525,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std return &df->getHotPixels(); } else { - return 0; + return nullptr; } } @@ -624,7 +624,7 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std } if(!found) { - return 0; + return nullptr; } else { return &(iter->second); } diff --git a/rtengine/dfmanager.h b/rtengine/dfmanager.h index befe67f5a..1cc22723b 100644 --- a/rtengine/dfmanager.h +++ b/rtengine/dfmanager.h @@ -39,10 +39,10 @@ public: dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t) - : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(nullptr) {} dfInfo( const dfInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(nullptr) {} ~dfInfo() { if( ri ) { diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 8b26c3121..eae00cad0 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -41,7 +41,7 @@ inline ffInfo& ffInfo::operator =(const ffInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } return *this; @@ -131,7 +131,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -193,7 +193,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -291,11 +291,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file ) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -303,11 +303,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -319,7 +319,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } @@ -327,7 +327,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } ffList_t::iterator iter; @@ -367,7 +367,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch (Gio::Error&) {} - return 0; + return nullptr; } void FFManager::getStat( int &totFiles, int &totTemplates) @@ -394,7 +394,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const std::string &len, double focal, double apert, time_t t ) { if( ffList.empty() ) { - return 0; + return nullptr; } std::string key( ffInfo::key(mak, mod, len, focal, apert) ); @@ -428,7 +428,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -439,7 +439,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string if( ff ) { return ff->getRawImage(); } else { - return 0; + return nullptr; } } @@ -457,7 +457,7 @@ RawImage* FFManager::searchFlatField( const Glib::ustring filename ) return ff->getRawImage(); } - return 0; + return nullptr; } diff --git a/rtengine/ffmanager.h b/rtengine/ffmanager.h index 5f6b2d267..f285bb5bf 100644 --- a/rtengine/ffmanager.h +++ b/rtengine/ffmanager.h @@ -42,10 +42,10 @@ public: ffInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, const std::string & len, double focal, double apert, time_t t) - : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(nullptr) {} ffInfo( const ffInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(nullptr) {} ~ffInfo() { if( ri ) { diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index fef281c49..21ba86f28 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -180,7 +180,7 @@ read_icc_profile (j_decompress_ptr cinfo, unsigned int data_length[MAX_SEQ_NO + 1]; /* size of profile data in marker */ unsigned int data_offset[MAX_SEQ_NO + 1]; /* offset for data in marker */ - *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ + *icc_data_ptr = nullptr; /* avoid confusion if FALSE return */ *icc_data_len = 0; /* This first pass over the saved markers discovers whether there are @@ -191,7 +191,7 @@ read_icc_profile (j_decompress_ptr cinfo, marker_present[seq_no] = 0; } - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { if (num_markers == 0) { num_markers = GETJOCTET(marker->data[13]); @@ -236,12 +236,12 @@ read_icc_profile (j_decompress_ptr cinfo, /* Allocate space for assembled data */ icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) { + if (icc_data == nullptr) { return FALSE; /* oops, out of memory */ } /* and fill it in */ - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { JOCTET FAR *src_ptr; JOCTET *dst_ptr; diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 82f280e54..85409fd53 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -187,8 +187,8 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di ProfileMap profiles; - loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); - loadProfiles (dirName, &profiles, NULL, NULL, false, true); + loadProfiles (profilesDir, &profiles, nullptr, nullptr, false, true); + loadProfiles (dirName, &profiles, nullptr, nullptr, false, true); for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); @@ -201,14 +201,14 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) { // forgive me for the messy code, quick hack to change gamma of an ICC profile to the RT standard gamma if (!iprof) { - return NULL; + return nullptr; } cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(iprof, 0, &bytesNeeded); + cmsSaveProfileToMem(iprof, nullptr, &bytesNeeded); if (bytesNeeded == 0) { - return NULL; + return nullptr; } uint8_t *data = new uint8_t[bytesNeeded + 1]; @@ -407,7 +407,7 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const // profile does not exist if (f == fileStdProfilesFileNames.end ()) { - return NULL; + return nullptr; } // but there exists one => load it @@ -464,15 +464,15 @@ void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCD profilesDir = Glib::build_filename (rtICCDir, "output"); fileProfiles.clear(); fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, NULL, false, true); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, NULL, false, true); + loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false, true); + loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false, true); // Input profiles // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) stdProfilesDir = Glib::build_filename (rtICCDir, "input"); fileStdProfiles.clear(); fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, NULL, NULL, &fileStdProfilesFileNames, true, false); + loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true, false); } // Determine the first monitor default profile of operating system, if selected @@ -515,7 +515,7 @@ void ICCStore::findDefaultMonitorProfile () } } -ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(NULL), length(0) +ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(nullptr), length(0) { FILE* f = g_fopen (fileName.c_str (), "rb"); @@ -542,16 +542,16 @@ ProfileContent::ProfileContent (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } } -ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(NULL), length(0) +ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) { - if (hProfile != NULL) { + if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { data = new char[bytesNeeded + 1]; @@ -573,7 +573,7 @@ ProfileContent& ProfileContent::operator= (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } return *this; @@ -585,7 +585,7 @@ cmsHPROFILE ProfileContent::toProfile () const if (data) { return cmsOpenProfileFromMem (data, length); } else { - return NULL; + return nullptr; } } diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 05281f9df..62212e397 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -120,7 +120,7 @@ public: #define iccStore ICCStore::getInstance() inline ProfileContent::ProfileContent () : - data(NULL), + data(nullptr), length(0) { } diff --git a/rtengine/iimage.h b/rtengine/iimage.h index cd49c1329..70f07d68f 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -144,7 +144,7 @@ public: #if CHECK_BOUNDS PlanarPtr() : width_(0), height_(0), ptrs (NULL) {} #else - PlanarPtr() : ptrs (NULL) {} + PlanarPtr() : ptrs (nullptr) {} #endif bool resize(int newSize) @@ -153,7 +153,7 @@ public: ptrs = ab.data; return true; } else { - ptrs = NULL; + ptrs = nullptr; return false; } } @@ -219,8 +219,8 @@ public: T* data; PlanarPtr v; // v stands for "value", whatever it represent - PlanarWhateverData() : rowstride(0), data (NULL) {} - PlanarWhateverData(int w, int h) : rowstride(0), data (NULL) + PlanarWhateverData() : rowstride(0), data (nullptr) {} + PlanarWhateverData(int w, int h) : rowstride(0), data (nullptr) { allocate(w, h); } @@ -291,7 +291,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; v.resize(0); width = height = -1; #if CHECK_BOUNDS @@ -593,7 +593,7 @@ public: PlanarPtr b; PlanarRGBData() : rowstride(0), planestride(0), data (NULL) {} - PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (NULL) + PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (nullptr) { allocate(w, h); } @@ -683,7 +683,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; r.resize(0); g.resize(0); b.resize(0); @@ -1165,7 +1165,7 @@ public: #if CHECK_BOUNDS ChunkyPtr() : ptr (NULL), width(-1), width_(0), height_(0) {} #else - ChunkyPtr() : ptr (NULL), width(-1) {} + ChunkyPtr() : ptr (nullptr), width(-1) {} #endif void init(T* base, int w = -1) { @@ -1232,7 +1232,7 @@ public: ChunkyPtr b; ChunkyRGBData() : data (NULL) {} - ChunkyRGBData(int w, int h) : data (NULL) + ChunkyRGBData(int w, int h) : data (nullptr) { allocate(w, h); } @@ -1299,10 +1299,10 @@ public: g.init(data + 1, width); b.init(data + 2, width); } else { - data = NULL; - r.init(NULL); - g.init(NULL); - b.init(NULL); + data = nullptr; + r.init(nullptr); + g.init(nullptr); + b.init(nullptr); width = height = -1; #if CHECK_BOUNDS r.width_ = r.height_ = -1; @@ -1315,7 +1315,7 @@ public: /** Copy the data to another ChunkyRGBData */ void copyData(ChunkyRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); diff --git a/rtengine/image16.h b/rtengine/image16.h index 0e1ac6786..05357839c 100644 --- a/rtengine/image16.h +++ b/rtengine/image16.h @@ -56,7 +56,7 @@ public: return 8 * sizeof(unsigned short); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage16: virtual MyMutex& getMutex () diff --git a/rtengine/image8.cc b/rtengine/image8.cc index d7a49138b..8cb2b887a 100644 --- a/rtengine/image8.cc +++ b/rtengine/image8.cc @@ -40,7 +40,7 @@ Image8::~Image8 () void Image8::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -58,7 +58,7 @@ void Image8::getScanline (int row, unsigned char* buffer, int bps) void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/image8.h b/rtengine/image8.h index 188e20146..d0d7445e0 100644 --- a/rtengine/image8.h +++ b/rtengine/image8.h @@ -51,7 +51,7 @@ public: return 8 * sizeof(unsigned char); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage*: virtual MyMutex& getMutex () diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 2622ffcf7..c3e8c7780 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -48,8 +48,8 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( { size_t dotpos = fname.find_last_of ('.'); - root = NULL; - iptc = NULL; + root = nullptr; + iptc = nullptr; if (ri && (ri->exifBase >= 0 || ri->ciffBase >= 0)) { FILE* f = g_fopen (fname.c_str (), "rb"); @@ -205,7 +205,7 @@ void ImageData::extractInfo () orientation = root->getTag ("Orientation")->valueToString (); } - rtexif::TagDirectory* exif = NULL; + rtexif::TagDirectory* exif = nullptr; if (root->getTag ("Exif")) { exif = root->getTag ("Exif")->getDirectory (); @@ -506,7 +506,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const unsigned char buffer[2100]; for (int i = 0; i < 16; i++) { - IptcDataSet* ds = iptc_data_get_next_dataset (iptc, NULL, IPTC_RECORD_APP_2, strTags[i].tag); + IptcDataSet* ds = iptc_data_get_next_dataset (iptc, nullptr, IPTC_RECORD_APP_2, strTags[i].tag); if (ds) { iptc_dataset_get_data (ds, buffer, 2100); @@ -518,7 +518,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } } - IptcDataSet* ds = NULL; + IptcDataSet* ds = nullptr; std::vector keywords; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_KEYWORDS))) { @@ -527,7 +527,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } iptcc["Keywords"] = keywords; - ds = NULL; + ds = nullptr; std::vector suppCategories; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_SUPPL_CATEGORY))) { @@ -623,20 +623,20 @@ extern "C" { unsigned int iptc_len; if (!infile) { - return NULL; + return nullptr; } d = iptc_data_new (); if (!d) { - return NULL; + return nullptr; } buf = (unsigned char*)iptc_mem_alloc (d->priv->mem, buf_len); if (!buf) { iptc_data_unref (d); - return NULL; + return nullptr; } len = iptc_jpeg_read_ps3 (infile, buf, buf_len); @@ -659,7 +659,7 @@ extern "C" { failure: iptc_mem_free (d->priv->mem, buf); iptc_data_unref (d); - return NULL; + return nullptr; } } diff --git a/rtengine/imagedata.h b/rtengine/imagedata.h index 9ec3558c1..f28a49a2f 100644 --- a/rtengine/imagedata.h +++ b/rtengine/imagedata.h @@ -54,7 +54,7 @@ protected: public: - ImageData (Glib::ustring fname, RawMetaDataLocation* rml = NULL); + ImageData (Glib::ustring fname, RawMetaDataLocation* rml = nullptr); virtual ~ImageData (); const rtexif::TagDirectory* getExifData () const diff --git a/rtengine/imagefloat.cc b/rtengine/imagefloat.cc index ae4a1a09b..f4629682d 100644 --- a/rtengine/imagefloat.cc +++ b/rtengine/imagefloat.cc @@ -47,7 +47,7 @@ Imagefloat::~Imagefloat () void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -146,7 +146,7 @@ void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *mi void Imagefloat::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/imagefloat.h b/rtengine/imagefloat.h index 50b0d4aeb..1083ac609 100644 --- a/rtengine/imagefloat.h +++ b/rtengine/imagefloat.h @@ -60,7 +60,7 @@ public: return 8 * sizeof(float); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImagefloat: virtual MyMutex& getMutex () diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index a9be4e7e3..0b3d17905 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,7 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = NULL; + FILE* f = nullptr; #ifdef WIN32 @@ -91,13 +91,13 @@ Glib::ustring ImageIO::errorMsg[6] = {"Success", "Cannot read file.", "Invalid h // For only copying the raw input data void ImageIO::setMetadata (const rtexif::TagDirectory* eroot) { - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (NULL); + rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (nullptr); // make IPTC and XMP pass through td->keepTag(0x83bb); // IPTC @@ -115,18 +115,18 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr exifChange.clear(); exifChange = exif; - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - exifRoot = ((rtexif::TagDirectory*)eroot)->clone (NULL); + exifRoot = ((rtexif::TagDirectory*)eroot)->clone (nullptr); } - if (iptc != NULL) { + if (iptc != nullptr) { iptc_data_free (iptc); - iptc = NULL; + iptc = nullptr; } // build iptc structures for libiptcdata @@ -184,7 +184,7 @@ void ImageIO::setOutputProfile (char* pdata, int plen) profileData = new char [plen]; memcpy (profileData, pdata, plen); } else { - profileData = NULL; + profileData = nullptr; } profileLength = plen; @@ -224,7 +224,7 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -303,7 +303,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -331,7 +331,7 @@ int ImageIO::loadPNG (Glib::ustring fname) png_read_info(png, info); - embProfile = NULL; + embProfile = nullptr; //retrieving image information png_uint_32 width, height; @@ -388,7 +388,7 @@ int ImageIO::loadPNG (Glib::ustring fname) for (unsigned int i = 0; i < height; i++) { - png_read_row (png, (png_byte*)row, NULL); + png_read_row (png, (png_byte*)row, nullptr); if (bit_depth == 16) { // convert scanline to host byte order unsigned short* srow = (unsigned short*)row; @@ -405,7 +405,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } } - png_read_end (png, 0); + png_read_end (png, nullptr); png_destroy_read_struct (&png, &info, &end_info); delete [] row; @@ -489,7 +489,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -568,7 +568,7 @@ int ImageIO::loadJPEG (Glib::ustring fname) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -623,7 +623,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -732,7 +732,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -821,7 +821,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) // Saving the profile in the memory cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(embProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(embProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { loadedProfileData = new char[bytesNeeded + 1]; @@ -836,7 +836,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) } } else { - embProfile = NULL; + embProfile = nullptr; } allocate (width, height); @@ -859,7 +859,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); } else { - setScanline (row, linebuffer, bitspersample, NULL, NULL); + setScanline (row, linebuffer, bitspersample, nullptr, nullptr); } if (pl && !(row % 100)) { @@ -930,7 +930,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) pl->setProgress (0.0); } - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -940,7 +940,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_infop info = png_create_info_struct(png); if (!info) { - png_destroy_write_struct (&png, 0); + png_destroy_write_struct (&png, nullptr); fclose (file); return IMIO_HEADERERROR; } @@ -1123,7 +1123,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (NULL, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1329,23 +1329,23 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) //TODO Even though we are saving EXIF IFD - MakerNote still comes out screwed. - if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != nullptr) { TIFFSetField (out, TIFFTAG_MODEL, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != nullptr) { TIFFSetField (out, TIFFTAG_MAKE, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != nullptr) { TIFFSetField (out, TIFFTAG_DATETIME, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != nullptr) { TIFFSetField (out, TIFFTAG_ARTIST, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != nullptr) { TIFFSetField (out, TIFFTAG_COPYRIGHT, tag->getValue()); } @@ -1442,7 +1442,7 @@ void png_flush(png_structp png_ptr) FILE *io_ptr; io_ptr = (FILE *)(png_get_io_ptr(png_ptr)); - if (io_ptr != NULL) { + if (io_ptr != nullptr) { fflush(io_ptr); } } diff --git a/rtengine/imageio.h b/rtengine/imageio.h index 1a13458c1..00bdbece1 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -97,13 +97,13 @@ private: } } - loadedProfileData = NULL; + loadedProfileData = nullptr; } public: static Glib::ustring errorMsg[6]; - ImageIO () : pl (NULL), embProfile(NULL), profileData(NULL), profileLength(0), loadedProfileData(NULL), loadedProfileDataJpg(false), - loadedProfileLength(0), iptc(NULL), exifRoot (NULL), sampleFormat(IIOSF_UNKNOWN), + ImageIO () : pl (nullptr), embProfile(nullptr), profileData(nullptr), profileLength(0), loadedProfileData(nullptr), loadedProfileDataJpg(false), + loadedProfileLength(0), iptc(nullptr), exifRoot (nullptr), sampleFormat(IIOSF_UNKNOWN), sampleArrangement(IIOSA_UNKNOWN) {} virtual ~ImageIO (); @@ -137,7 +137,7 @@ public: virtual int getBPS () = 0; virtual void getScanline (int row, unsigned char* buffer, int bps) {} - virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = NULL, float maxValue[3] = NULL) {} + virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = nullptr, float maxValue[3] = nullptr) {} virtual bool readImage (Glib::ustring &fname, FILE *fh) { diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 305c67da5..681da1f3d 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -63,7 +63,7 @@ protected: public: ImageSource () : references (1), redAWBMul(-1.), greenAWBMul(-1.), blueAWBMul(-1.), - embProfile(NULL), idata(NULL), dirpyrdenoiseExpComp(INFINITY) {} + embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {} virtual ~ImageSource () {} virtual int load (const Glib::ustring &fname, bool batch = false) = 0; @@ -111,7 +111,7 @@ public: virtual bool isRAW() const = 0; virtual DCPProfile* getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - return NULL; + return nullptr; }; virtual void setProgressListener (ProgressListener* pl) {} diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 8925b29e0..981a1ebd7 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -32,8 +32,8 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(NULL), oprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), scale(10), + : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), + ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), @@ -86,7 +86,7 @@ ImProcCoordinator::ImProcCoordinator () bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), fullw(1), fullh(1), pW(-1), pH(-1), - plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), + plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) @@ -539,7 +539,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { @@ -611,7 +611,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); - ipf.chromiLuminanceCurve (NULL, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); + ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { @@ -765,7 +765,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) delete ncie; } - ncie = NULL; + ncie = nullptr; if (CAMBrightCurveJ) { CAMBrightCurveJ.reset(); @@ -849,19 +849,19 @@ void ImProcCoordinator::freeAll () delete oprevi; } - oprevi = NULL; + oprevi = nullptr; delete orig_prev; - orig_prev = NULL; + orig_prev = nullptr; delete oprevl; - oprevl = NULL; + oprevl = nullptr; delete nprevl; - nprevl = NULL; + nprevl = nullptr; if (ncie) { delete ncie; } - ncie = NULL; + ncie = nullptr; if (imageListener) { imageListener->delImage (previmg); @@ -875,7 +875,7 @@ void ImProcCoordinator::freeAll () delete shmap; } - shmap = NULL; + shmap = nullptr; } @@ -1094,7 +1094,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock(mProcessing); - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); @@ -1262,7 +1262,7 @@ void ImProcCoordinator::startProcessing () if (!destroying) { if (!updaterRunning) { updaterThreadStart.lock (); - thread = NULL; + thread = nullptr; updaterRunning = true; updaterThreadStart.unlock (); diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 0fb0041f3..0a0cbb2b0 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -174,7 +174,7 @@ protected: void reallocAll (); void updateLRGBHistograms (); void setScale (int prevscale); - void updatePreviewImage (int todo, Crop* cropCall = NULL); + void updatePreviewImage (int todo, Crop* cropCall = nullptr); MyMutex mProcessing; ProcParams params; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ce65bc2f8..9eedfde2a 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -214,7 +214,7 @@ public: ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread) {} + : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread) {} ~ImProcFunctions (); void setScale (double iscale); @@ -279,7 +279,7 @@ public: void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = NULL); + float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); @@ -314,11 +314,11 @@ public: void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = NULL); + void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); + void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); @@ -335,7 +335,7 @@ public: const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = NULL, bool madCalculated = false); + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); @@ -366,11 +366,11 @@ public: Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw);//without gamma ==>default // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = NULL); + double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/init.cc b/rtengine/init.cc index 3b2c5fbdc..27edd976b 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -35,7 +35,7 @@ namespace rtengine const Settings* settings; -MyMutex* lcmsMutex = NULL; +MyMutex* lcmsMutex = nullptr; int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir) { diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 9e81f4f90..805fb766b 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -146,7 +146,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } lcmsMutex->lock (); - cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); + cmsHPROFILE hLab = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (hLab, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is important for thread safety cmsCloseProfile(hLab); @@ -508,8 +508,8 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int Parameters[6] = ga6; // 7 parameters for smoother curves cmsWhitePointFromTemp(&xyD, t50); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 - cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(NULL, &xyD, &Primaries, GammaTRC); //oprofdef becomes Outputprofile + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters);//5 = more smoother than 4 + cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(nullptr, &xyD, &Primaries, GammaTRC); //oprofdef becomes Outputprofile cmsFreeToneCurve(GammaTRC[0]); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 547ebf69c..d22fe08f2 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -43,7 +43,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, green.clear (); blue.clear (); - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { for (size_t i = 0; i < src.size(); i++) { red.push_back (Coord2D (src[i].x, src[i].y)); green.push_back (Coord2D (src[i].x, src[i].y)); @@ -234,7 +234,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, double focalLen, double focalLen35mm, float focusDist, int rawRotationDeg, bool fullImage) { - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile(params->lensProf.lcpFile); @@ -703,7 +703,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr oH * tan(hpalpha) * sqrt(SQR(4 * maxRadius) + SQR(oH * tan(hpalpha)))) / (SQR(maxRadius) * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : NULL) : 1.0; + double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : nullptr) : 1.0; // smaller crop images are a problem, so only when processing fully bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; @@ -1005,7 +1005,7 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap) { - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { return 1; } diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 1d152c737..215763f43 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -77,7 +77,7 @@ void ImProcFunctions::vibrance (LabImage* lab) // int skip=1; //scale==1 ? 1 : 16; bool skinCurveIsSet = false; - DiagonalCurve* dcurve = NULL; + DiagonalCurve* dcurve = nullptr; dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS); if (dcurve) { @@ -85,14 +85,14 @@ void ImProcFunctions::vibrance (LabImage* lab) skinCurveIsSet = true; } else { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } } if (!skinCurveIsSet && !params->vibrance.pastels && !params->vibrance.saturated) { if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } return; @@ -117,7 +117,7 @@ void ImProcFunctions::vibrance (LabImage* lab) if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } @@ -180,7 +180,7 @@ void ImProcFunctions::vibrance (LabImage* lab) #ifdef _DEBUG - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (avoidcolorshift) { MunsDebugInfo = new MunsellDebugInfo(); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 048f1b5d6..76dd15e59 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -699,7 +699,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int int height = tilebottom - tiletop; LabImage * labco; float **Lold; - float *LoldBuffer = NULL; + float *LoldBuffer = nullptr; if(numtiles == 1) { // untiled processing => we can use output buffer for labco labco = dst; @@ -825,7 +825,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int for(int i = (tileheight + 1) / 2; i < tileheight; i++) { delete [] varhue[i]; - varhue[i] = NULL; + varhue[i] = nullptr; } } else { // reduce the varhue array to get faster access in following processing for (int i = 0; i < (tileheight + 1) / 2; i++) { @@ -915,21 +915,21 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int vari[1] = max(0.0001f, vari[1]); vari[2] = max(0.0001f, vari[2]); vari[3] = max(0.0001f, vari[3]); - float* noisevarlum = NULL; // we need a dummy to pass it to WaveletDenoiseAllL + float* noisevarlum = nullptr; // we need a dummy to pass it to WaveletDenoiseAllL WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge); } ind = 1; //Flat curve for Contrast=f(H) in levels - FlatCurve* ChCurve = NULL;//curve C=f(H) + FlatCurve* ChCurve = nullptr;//curve C=f(H) bool Chutili = false; ChCurve = new FlatCurve(params->wavelet.Chcurve); if (!ChCurve || ChCurve->isIdentity()) { if (ChCurve) { delete ChCurve; - ChCurve = NULL; + ChCurve = nullptr; } } else { Chutili = true; @@ -952,14 +952,14 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } //Flat curve for H=f(H) in residual image - FlatCurve* hhCurve = NULL;//curve H=f(H) + FlatCurve* hhCurve = nullptr;//curve H=f(H) bool hhutili = false; hhCurve = new FlatCurve(params->wavelet.hhcurve); if (!hhCurve || hhCurve->isIdentity()) { if (hhCurve) { delete hhCurve; - hhCurve = NULL; + hhCurve = nullptr; } } else { hhutili = true; @@ -1224,7 +1224,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } } - if(LoldBuffer != NULL) { + if(LoldBuffer != nullptr) { delete [] LoldBuffer; delete [] Lold; } @@ -1236,7 +1236,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } for (int i = 0; i < tileheight; i++) - if(varhue[i] != NULL) { + if(varhue[i] != nullptr) { delete [] varhue[i]; } @@ -1435,7 +1435,7 @@ float *ImProcFunctions::ContrastDR(float *Source, int skip, struct cont_params & { int n = W_L * H_L; - if(Contrast == NULL) { + if(Contrast == nullptr) { Contrast = new float[n]; } @@ -1489,7 +1489,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int skip, struct c float *ucr = ContrastDR(Source, skip, cp, W_L, H_L, Compression, DetailBoost, max0, min0, ave, ah, bh, al, bl, factorx); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = ucr; } @@ -1697,7 +1697,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float max0 = 0.f; float min0 = FLT_MAX; - if(contrast != 0.f || cp.tonemap && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step + if(contrast != 0.f || (cp.tonemap && cp.resena)) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step #ifdef _RT_NESTED_OPENMP #pragma omp parallel for reduction(+:avedbl) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1771,7 +1771,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float *koeLi[12]; float maxkoeLi[12]; - float *koeLibuffer = NULL; + float *koeLibuffer = nullptr; for(int y = 0; y < 12; y++) { maxkoeLi[y] = 0.f; //9 diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index ff509301d..0c2a13ed0 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -213,7 +213,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); @@ -231,7 +231,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) src->pub.term_source = my_term_source; src->infile = infile; src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ + src->pub.next_input_byte = nullptr; /* until buffer loaded */ } METHODDEF(void) @@ -338,7 +338,7 @@ format_message (j_common_ptr cinfo, char * buffer) { struct jpeg_error_mgr * err = cinfo->err; int msg_code = err->msg_code; - const char * msgtext = NULL; + const char * msgtext = nullptr; const char * msgptr; char ch; boolean isstring; @@ -346,14 +346,14 @@ format_message (j_common_ptr cinfo, char * buffer) /* Look up message string in proper table */ if (msg_code > 0 && msg_code <= err->last_jpeg_message) { msgtext = err->jpeg_message_table[msg_code]; - } else if (err->addon_message_table != NULL && + } else if (err->addon_message_table != nullptr && msg_code >= err->first_addon_message && msg_code <= err->last_addon_message) { msgtext = err->addon_message_table[msg_code - err->first_addon_message]; } /* Defend against bogus message number */ - if (msgtext == NULL) { + if (msgtext == nullptr) { err->msg_parm.i[0] = msg_code; msgtext = err->jpeg_message_table[0]; } @@ -419,7 +419,7 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) err->jpeg_message_table = jpeg_std_message_table; err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - err->addon_message_table = NULL; + err->addon_message_table = nullptr; err->first_addon_message = 0; /* for safety */ err->last_addon_message = 0; diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_memsrc.cc index ab4ecf7d6..5459af8b6 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_memsrc.cc @@ -155,7 +155,7 @@ jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET * buffer, size_t bufsize) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); diff --git a/rtengine/klt/klt.cc b/rtengine/klt/klt.cc index 831914754..54bb2f93a 100644 --- a/rtengine/klt/klt.cc +++ b/rtengine/klt/klt.cc @@ -73,7 +73,7 @@ static void** _createArray2D(int ncols, int nrows, int nbytes) tt = (char **) malloc(nrows * sizeof(void *) + ncols * nrows * nbytes); - if (tt == NULL) { + if (tt == nullptr) { KLTError("(createArray2D) Out of memory"); exit(1); } @@ -115,9 +115,9 @@ KLT_TrackingContext KLTCreateTrackingContext() tc->pyramid_sigma_fact = pyramid_sigma_fact; tc->step_factor = step_factor; tc->nSkippedPixels = nSkippedPixels; - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; /* for affine mapping */ tc->affineConsistencyCheck = affineConsistencyCheck; tc->affine_window_width = affine_window_size; @@ -164,9 +164,9 @@ KLT_FeatureList KLTCreateFeatureList( first = (KLT_Feature) (fl->feature + nFeatures); for (i = 0 ; i < nFeatures ; i++) { fl->feature[i] = first + i; - fl->feature[i]->aff_img = NULL; /* initialization fixed by Sinisa Segvic */ - fl->feature[i]->aff_img_gradx = NULL; - fl->feature[i]->aff_img_grady = NULL; + fl->feature[i]->aff_img = nullptr; /* initialization fixed by Sinisa Segvic */ + fl->feature[i]->aff_img_gradx = nullptr; + fl->feature[i]->aff_img_grady = nullptr; } /* Return feature list */ return(fl); @@ -272,13 +272,13 @@ void KLTPrintTrackingContext( fprintf(stderr, "\tnPyramidLevels = %d\n", tc->nPyramidLevels); fprintf(stderr, "\tsubsampling = %d\n", tc->subsampling); - fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=NULL) ? + fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_gradx = %s\n", - (tc->pyramid_last_gradx!=NULL) ? + (tc->pyramid_last_gradx!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_grady = %s\n", - (tc->pyramid_last_grady!=NULL) ? + (tc->pyramid_last_grady!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\n\n"); } @@ -464,9 +464,9 @@ void KLTFreeFeatureList( _KLTFreeFloatImage(fl->feature[indx]->aff_img); _KLTFreeFloatImage(fl->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(fl->feature[indx]->aff_img_grady); - fl->feature[indx]->aff_img = NULL; - fl->feature[indx]->aff_img_gradx = NULL; - fl->feature[indx]->aff_img_grady = NULL; + fl->feature[indx]->aff_img = nullptr; + fl->feature[indx]->aff_img_gradx = nullptr; + fl->feature[indx]->aff_img_grady = nullptr; } free(fl); @@ -498,9 +498,9 @@ void KLTStopSequentialMode( _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_gradx); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_grady); - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; } diff --git a/rtengine/klt/klt_util.cc b/rtengine/klt/klt_util.cc index e1fc342f3..c01022445 100644 --- a/rtengine/klt/klt_util.cc +++ b/rtengine/klt/klt_util.cc @@ -40,7 +40,7 @@ _KLT_FloatImage _KLTCreateFloatImage( ncols * nrows * sizeof(float); floatimg = (_KLT_FloatImage) malloc(nbytes); - if (floatimg == NULL) { + if (floatimg == nullptr) { KLTError("(_KLTCreateFloatImage) Out of memory"); exit(1); } diff --git a/rtengine/klt/pnmio.cc b/rtengine/klt/pnmio.cc index de8a1b0d9..b25dc3ca8 100644 --- a/rtengine/klt/pnmio.cc +++ b/rtengine/klt/pnmio.cc @@ -130,7 +130,7 @@ void pgmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -156,7 +156,7 @@ void ppmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(ppmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -188,9 +188,9 @@ unsigned char* pgmRead( pgmReadHeader(fp, &magic, ncols, nrows, &maxval); /* Allocate memory, if necessary, and set pointer */ - if (img == NULL) { + if (img == nullptr) { ptr = (unsigned char *) malloc(*ncols * *nrows * sizeof(char)); - if (ptr == NULL) { + if (ptr == nullptr) { KLTError("(pgmRead) Memory not allocated"); exit(1); } @@ -226,7 +226,7 @@ unsigned char* pgmReadFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -279,7 +279,7 @@ void pgmWriteFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(pgmWriteFile) Can't open file named '%s' for writing\n", fname); exit(1); } @@ -338,7 +338,7 @@ void ppmWriteFileRGB( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(ppmWriteFileRGB) Can't open file named '%s' for writing\n", fname); exit(1); } diff --git a/rtengine/klt/pyramid.cc b/rtengine/klt/pyramid.cc index e8b9f47ec..e72ffb237 100644 --- a/rtengine/klt/pyramid.cc +++ b/rtengine/klt/pyramid.cc @@ -43,7 +43,7 @@ _KLT_Pyramid _KLTCreatePyramid( /* Allocate memory for structure and set parameters */ pyramid = (_KLT_Pyramid) malloc(nbytes); - if (pyramid == NULL) { + if (pyramid == nullptr) { KLTError("(_KLTCreatePyramid) Out of memory"); exit(1); } diff --git a/rtengine/klt/selectGoodFeatures.cc b/rtengine/klt/selectGoodFeatures.cc index 176057f39..20e67fb2e 100644 --- a/rtengine/klt/selectGoodFeatures.cc +++ b/rtengine/klt/selectGoodFeatures.cc @@ -179,9 +179,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = -1; featurelist->feature[indx]->y = -1; featurelist->feature[indx]->val = KLT_NOT_FOUND; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -217,9 +217,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = (KLT_locType) x; featurelist->feature[indx]->y = (KLT_locType) y; featurelist->feature[indx]->val = (int) val; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -340,12 +340,12 @@ void _KLTSelectGoodFeatures( /* Create temporary images, etc. */ if (mode == REPLACING_SOME && - tc->sequentialMode && tc->pyramid_last != NULL) { + tc->sequentialMode && tc->pyramid_last != nullptr) { floatimg = ((_KLT_Pyramid) tc->pyramid_last)->img[0]; gradx = ((_KLT_Pyramid) tc->pyramid_last_gradx)->img[0]; grady = ((_KLT_Pyramid) tc->pyramid_last_grady)->img[0]; - assert(gradx != NULL); - assert(grady != NULL); + assert(gradx != nullptr); + assert(grady != nullptr); } else { floatimages_created = TRUE; floatimg = _KLTCreateFloatImage(ncols, nrows); diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 3ade7264f..5930e2fcb 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -317,7 +317,7 @@ static _FloatWindow _allocateFloatWindow( _FloatWindow fw; fw = (_FloatWindow) malloc(width*height*sizeof(float)); - if (fw == NULL) { + if (fw == nullptr) { KLTError("(_allocateFloatWindow) Out of memory."); exit(1); } @@ -1291,7 +1291,7 @@ void KLTTrackFeatures( /* Process first image by converting to float, smoothing, computing */ /* pyramid, and computing gradient pyramids */ - if (tc->sequentialMode && tc->pyramid_last != NULL) { + if (tc->sequentialMode && tc->pyramid_last != nullptr) { pyramid1 = (_KLT_Pyramid) tc->pyramid_last; pyramid1_gradx = (_KLT_Pyramid) tc->pyramid_last_gradx; pyramid1_grady = (_KLT_Pyramid) tc->pyramid_last_grady; @@ -1301,8 +1301,8 @@ void KLTTrackFeatures( ncols, nrows, pyramid1->ncols[0], pyramid1->nrows[0]); exit(1); } - assert(pyramid1_gradx != NULL); - assert(pyramid1_grady != NULL); + assert(pyramid1_gradx != nullptr); + assert(pyramid1_grady != nullptr); } else { floatimg1_created = TRUE; floatimg1 = _KLTCreateFloatImage(ncols, nrows); @@ -1398,9 +1398,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (_outOfBounds(xlocout, ylocout, ncols, nrows, tc->borderx, tc->bordery)) { featurelist->feature[indx]->x = -1.0; @@ -1409,9 +1409,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_SMALL_DET) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1419,9 +1419,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_LARGE_RESIDUE) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1429,9 +1429,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_MAX_ITERATIONS) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1439,9 +1439,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else { featurelist->feature[indx]->x = xlocout; featurelist->feature[indx]->y = ylocout; @@ -1497,9 +1497,9 @@ void KLTTrackFeatures( _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; }else{ /*featurelist->feature[indx]->x = xlocout;*/ /*featurelist->feature[indx]->y = ylocout;*/ diff --git a/rtengine/klt/writeFeatures.cc b/rtengine/klt/writeFeatures.cc index d902778de..1bfe3f20f 100644 --- a/rtengine/klt/writeFeatures.cc +++ b/rtengine/klt/writeFeatures.cc @@ -56,7 +56,7 @@ void KLTWriteFeatureListToPPM( redimg = (uchar *) malloc(nbytes); grnimg = (uchar *) malloc(nbytes); bluimg = (uchar *) malloc(nbytes); - if (redimg == NULL || grnimg == NULL || bluimg == NULL) { + if (redimg == nullptr || grnimg == nullptr || bluimg == nullptr) { KLTError("(KLTWriteFeaturesToPPM) Out of memory\n"); exit(1); } @@ -104,9 +104,9 @@ static FILE* _printSetupTxt( int i; /* Either open file or use stderr */ - if (fname == NULL) fp = stderr; + if (fname == nullptr) fp = stderr; else fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing\n", fname); exit(1); @@ -134,12 +134,12 @@ static FILE* _printSetupBin( const char *fname) /* Input: filename */ { FILE *fp; - if (fname == NULL) { + if (fname == nullptr) { KLTError("(KLTWriteFeatures) Can't write binary data to stderr"); exit(1); } fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing", fname); exit(1); @@ -351,13 +351,13 @@ void KLTWriteFeatureList( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature list to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_LIST, 0, fl->nFeatures); @@ -389,13 +389,13 @@ void KLTWriteFeatureHistory( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature history to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_HISTORY, fh->nFrames, 0); @@ -428,13 +428,13 @@ void KLTWriteFeatureTable( char type; int i, j; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature table to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_TABLE, ft->nFrames, ft->nFeatures); @@ -475,18 +475,18 @@ static structureType _readHeader( fread(line, sizeof(char), BINHEADERLENGTH, fp); line[BINHEADERLENGTH] = 0; if (strcmp(line, binheader_fl) == 0) { - assert(nFeatures != NULL); + assert(nFeatures != nullptr); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_LIST; } else if (strcmp(line, binheader_fh) == 0) { - assert(nFrames != NULL); + assert(nFrames != nullptr); fread(nFrames, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_HISTORY; } else if (strcmp(line, binheader_ft) == 0) { - assert(nFrames != NULL); - assert(nFeatures != NULL); + assert(nFrames != nullptr); + assert(nFeatures != nullptr); fread(nFrames, sizeof(int), 1, fp); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; @@ -525,9 +525,9 @@ static structureType _readHeader( /* and the parameters passed, exit now before we attempt */ /* to write to non-allocated memory. Higher routine should */ /* detect and handle this error. */ - if ((id == FEATURE_LIST && nFeatures == NULL) || - (id == FEATURE_HISTORY && nFrames == NULL) || - (id == FEATURE_TABLE && (nFeatures == NULL || nFrames == NULL))) + if ((id == FEATURE_LIST && nFeatures == nullptr) || + (id == FEATURE_HISTORY && nFrames == nullptr) || + (id == FEATURE_TABLE && (nFeatures == nullptr || nFrames == nullptr))) return id; /* Read nFeatures and nFrames */ @@ -627,21 +627,21 @@ KLT_FeatureList KLTReadFeatureList( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureList) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature list from '%s'\n", fname); - id = _readHeader(fp, NULL, &nFeatures, &binary); + id = _readHeader(fp, nullptr, &nFeatures, &binary); if (id != FEATURE_LIST) { KLTError("(KLTReadFeatureList) File '%s' does not contain " "a FeatureList", fname); exit(1); } - if (fl_in == NULL) { + if (fl_in == nullptr) { fl = KLTCreateFeatureList(nFeatures); fl->nFeatures = nFeatures; } @@ -690,20 +690,20 @@ KLT_FeatureHistory KLTReadFeatureHistory( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureHistory) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature history from '%s'\n", fname); - id = _readHeader(fp, &nFrames, NULL, &binary); + id = _readHeader(fp, &nFrames, nullptr, &binary); if (id != FEATURE_HISTORY) { KLTError("(KLTReadFeatureHistory) File '%s' does not contain " "a FeatureHistory", fname); exit(1); } - if (fh_in == NULL) { + if (fh_in == nullptr) { fh = KLTCreateFeatureHistory(nFrames); fh->nFrames = nFrames; } @@ -753,7 +753,7 @@ KLT_FeatureTable KLTReadFeatureTable( int i, j; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureTable) Can't open file '%s' " "for reading", fname); exit(1); @@ -766,7 +766,7 @@ KLT_FeatureTable KLTReadFeatureTable( exit(1); } - if (ft_in == NULL) { + if (ft_in == nullptr) { ft = KLTCreateFeatureTable(nFrames, nFeatures); ft->nFrames = nFrames; ft->nFeatures = nFeatures; diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 0f45e1270..ce1a6c67e 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -163,7 +163,7 @@ void LCPPersModel::print() const LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) { - if (pProf == NULL) { + if (pProf == nullptr) { return; } @@ -182,7 +182,7 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm bool mirrorY = (rot == 180 || rot == 270); //printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); - pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, NULL, NULL); + pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); if (!vignette) { @@ -281,7 +281,7 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) const int BufferSize = 8192; char buf[BufferSize]; - XML_Parser parser = XML_ParserCreate(NULL); + XML_Parser parser = XML_ParserCreate(nullptr); if (!parser) { throw "Couldn't allocate memory for XML parser"; @@ -296,7 +296,7 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) sensorFormatFactor = 1; for (int i = 0; i < MaxPersModelCount; i++) { - aPersModel[i] = NULL; + aPersModel[i] = nullptr; } persModelCount = 0; @@ -400,7 +400,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float euler = exp(1.0); // find the frames with the least distance, focal length wise - LCPPersModel *pLow = NULL, *pHigh = NULL; + LCPPersModel *pLow = nullptr, *pHigh = nullptr; float focalLengthLog = log(focalLength); //, apertureLog=aperture>0 ? log(aperture) : 0; float focusDistLog = focusDist > 0 ? log(focusDist) + euler : 0; @@ -410,11 +410,11 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float f = aPersModel[pm]->focLen; if (aPersModel[pm]->hasModeData(mode)) { - if (f <= focalLength && (pLow == NULL || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { + if (f <= focalLength && (pLow == nullptr || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { pLow = aPersModel[pm]; } - if (f >= focalLength && (pHigh == NULL || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { + if (f >= focalLength && (pHigh == nullptr || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { pHigh = aPersModel[pm]; } } @@ -488,7 +488,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float } } - if (pLow != NULL && pHigh != NULL) { + if (pLow != nullptr && pHigh != nullptr) { // average out the factors, linear interpolation in logarithmic scale float facLow = 0.5; bool focLenOnSpot = false; // pretty often, since max/min are often as frames in LCP @@ -555,7 +555,7 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // clean up tagname const char* src = strrchr(el, ':'); - if (src == NULL) { + if (src == nullptr) { src = const_cast(el); } else { src++; @@ -621,11 +621,11 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // some profiles (espc. Pentax) have a different structure that is attributes based // simulate tags by feeding them in - if (parseAttr && attr != NULL) { + if (parseAttr && attr != nullptr) { for (int i = 0; attr[i]; i += 2) { const char* nameStart = strrchr(attr[i], ':'); - if (nameStart == NULL) { + if (nameStart == nullptr) { nameStart = const_cast(attr[i]); } else { nameStart++; @@ -772,7 +772,7 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el) pProf->inPerspect = false; } else if (strstr(el, ":li")) { pProf->aPersModel[pProf->persModelCount] = pProf->pCurPersModel; - pProf->pCurPersModel = NULL; + pProf->pCurPersModel = nullptr; pProf->persModelCount++; } } @@ -787,7 +787,7 @@ LCPStore* LCPStore::getInstance() LCPProfile* LCPStore::getProfile (Glib::ustring filename) { if (filename.length() == 0 || !isValidLCPFileName(filename)) { - return NULL; + return nullptr; } MyMutex::MyLock lock(mtx); diff --git a/rtengine/loadinitial.cc b/rtengine/loadinitial.cc index cd4c4e8d6..c29d60621 100644 --- a/rtengine/loadinitial.cc +++ b/rtengine/loadinitial.cc @@ -36,7 +36,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e isrc->setProgressListener (pl); - if(isRaw && pl == NULL) { + if(isRaw && pl == nullptr) { *errorCode = isrc->load (fname, true); } else { *errorCode = isrc->load (fname); @@ -44,7 +44,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e if (*errorCode) { delete isrc; - return NULL; + return nullptr; } return isrc; diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index 0414cc1de..f9d0c3621 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -88,7 +88,7 @@ IMFILE* fopen (const char* fname) #endif if ( fd < 0 ) { - return 0; + return nullptr; } struct stat stat_buffer; @@ -96,15 +96,15 @@ IMFILE* fopen (const char* fname) if ( fstat(fd, &stat_buffer) < 0 ) { printf("no stat\n"); close (fd); - return 0; + return nullptr; } - void* data = mmap(0, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + void* data = mmap(nullptr, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if ( data == MAP_FAILED ) { printf("no mmap\n"); close(fd); - return 0; + return nullptr; } IMFILE* mf = new IMFILE; @@ -131,9 +131,9 @@ IMFILE* fopen (const char* fname) // initialize bzip stream structure bz_stream stream; - stream.bzalloc = 0; - stream.bzfree = 0; - stream.opaque = 0; + stream.bzalloc = nullptr; + stream.bzfree = nullptr; + stream.opaque = nullptr; ret = BZ2_bzDecompressInit(&stream, 0, 0); if (ret != BZ_OK) { @@ -142,7 +142,7 @@ IMFILE* fopen (const char* fname) // allocate initial buffer for decompressed data unsigned int buffer_out_count = 0; // bytes of decompressed data unsigned int buffer_size = 10 * 1024 * 1024; // 10 MB, extended dynamically if needed - char* buffer = 0; + char* buffer = nullptr; stream.next_in = mf->data; // input data address stream.avail_in = mf->size; @@ -404,7 +404,7 @@ char* fgets (char* s, int n, IMFILE* f) if (f->pos >= f->size) { f->eof = true; - return NULL; + return nullptr; } int i = 0; diff --git a/rtengine/pipettebuffer.cc b/rtengine/pipettebuffer.cc index d76589e99..6f6d9dcef 100644 --- a/rtengine/pipettebuffer.cc +++ b/rtengine/pipettebuffer.cc @@ -23,7 +23,7 @@ namespace rtengine { PipetteBuffer::PipetteBuffer(::EditDataProvider *dataProvider) : - dataProvider(dataProvider), imgFloatBuffer(NULL), LabBuffer(NULL), singlePlaneBuffer(), ready(false) {} + dataProvider(dataProvider), imgFloatBuffer(nullptr), LabBuffer(nullptr), singlePlaneBuffer(), ready(false) {} PipetteBuffer::~PipetteBuffer() { @@ -46,12 +46,12 @@ void PipetteBuffer::flush() { if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } singlePlaneBuffer.flushData(); @@ -69,7 +69,7 @@ EditUniqueID PipetteBuffer::getEditID() void PipetteBuffer::resize(int newWidth, int newHeight) { - resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : NULL); + resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : nullptr); } // Resize buffers if they already exist @@ -85,13 +85,13 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_LABIMAGE) { if (LabBuffer && (LabBuffer->W != newWidth && LabBuffer->H != newHeight)) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (!LabBuffer) { @@ -99,7 +99,7 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_SINGLEPLANE_FLOAT) { @@ -124,11 +124,11 @@ bool PipetteBuffer::bufferCreated() if (subscriber->getEditingType() == ET_PIPETTE) { switch (dataProvider->getCurrSubscriber()->getPipetteBufferType()) { case (BT_IMAGEFLOAT): - return imgFloatBuffer != NULL; + return imgFloatBuffer != nullptr; case (BT_LABIMAGE): - return LabBuffer != NULL; + return LabBuffer != nullptr; case (BT_SINGLEPLANE_FLOAT): - return singlePlaneBuffer.data != NULL; + return singlePlaneBuffer.data != nullptr; } } else { return false; @@ -159,7 +159,7 @@ void PipetteBuffer::getPipetteData(float* v, int x, int y, int squareSize) break; case (BT_SINGLEPLANE_FLOAT): - if (singlePlaneBuffer.data != NULL) { + if (singlePlaneBuffer.data != nullptr) { singlePlaneBuffer.getPipetteData(v[0], x, y, squareSize, 0); v[1] = v[2] = -1.f; return; diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index 16355a8c0..891186d8a 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -29,11 +29,11 @@ using namespace procparams; PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext, const PreviewImageMode mode) { - rtengine::Thumbnail* tpp = NULL; + rtengine::Thumbnail* tpp = nullptr; if (mode == PIM_EmbeddedPreviewOnly || mode == PIM_EmbeddedOrRaw) { - const unsigned char *data = NULL; + const unsigned char *data = nullptr; int width = -1, height = -1; @@ -107,8 +107,8 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext int error = rawImage.load(fname, true); if (!error) { - rtengine::Image8 *output = NULL; - const unsigned char *data = NULL; + rtengine::Image8 *output = nullptr; + const unsigned char *data = nullptr; int fw, fh; procparams::ProcParams params; diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index fbf56234f..c4f3eba38 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -34,7 +34,7 @@ public: procparams::ProcParams pparams; ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp) - : fname(fn), isRaw(iR), initialImage(NULL), pparams(pp) {} + : fname(fn), isRaw(iR), initialImage(nullptr), pparams(pp) {} ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) : fname(""), initialImage(iImage), pparams(pp) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 0b4d2a5b6..903bda6c6 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3431,7 +3431,7 @@ int ProcParams::write (const Glib::ustring &fname, const Glib::ustring &content) FILE *f; f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { error = 1; } else { fprintf (f, "%s", content.c_str()); @@ -8010,8 +8010,8 @@ PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue) pparams = new ProcParams(); pedited = new ParamsEdited(paramsEditedValue); } else { - pparams = NULL; - pedited = NULL; + pparams = nullptr; + pedited = nullptr; } } @@ -8035,13 +8035,13 @@ PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe) if (pp) { pparams = new ProcParams(*pp); } else { - pparams = NULL; + pparams = nullptr; } if (pe) { pedited = new ParamsEdited(*pe); } else { - pedited = NULL; + pedited = nullptr; } } @@ -8066,12 +8066,12 @@ void PartialProfile::deleteInstance () { if (pparams) { delete pparams; - pparams = NULL; + pparams = nullptr; } if (pedited) { delete pedited; - pedited = NULL; + pedited = nullptr; } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d51c032c0..3a1c4487b 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1318,14 +1318,14 @@ public: * @param pedited pointer to a ParamsEdited object (optional) to store which values has to be saved * @return Error code (=0 if all supplied filenames where created correctly) */ - int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = NULL); + int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = nullptr); /** * Loads the parameters from a file. * @param fname the name of the file * @params pedited pointer to a ParamsEdited object (optional) to store which values has been loaded * @return Error code (=0 if no error) */ - int load (const Glib::ustring &fname, ParamsEdited* pedited = NULL); + int load (const Glib::ustring &fname, ParamsEdited* pedited = nullptr); /** Creates a new instance of ProcParams. * @return a pointer to the new ProcParams instance. */ @@ -1373,8 +1373,8 @@ public: }; PartialProfile (bool createInstance = false, bool paramsEditedValue = false); - PartialProfile (ProcParams* pp, ParamsEdited* pe = NULL, bool fullCopy = false); - PartialProfile (const ProcParams* pp, const ParamsEdited* pe = NULL); + PartialProfile (ProcParams* pp, ParamsEdited* pe = nullptr, bool fullCopy = false); + PartialProfile (const ProcParams* pp, const ParamsEdited* pe = nullptr); void deleteInstance (); void clearGeneral (); int load (const Glib::ustring &fName); diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 8f91f8f4b..f631d4894 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -20,11 +20,11 @@ namespace rtengine extern const Settings* settings; RawImage::RawImage( const Glib::ustring &name ) - : data(NULL) + : data(nullptr) , prefilters(0) , filename(name) - , profile_data(NULL) - , allocation(NULL) + , profile_data(nullptr) + , allocation(nullptr) { memset(maximum_c4, 0, sizeof(maximum_c4)); RT_matrix_from_constant = 0; @@ -44,22 +44,22 @@ RawImage::~RawImage() if(allocation) { delete [] allocation; - allocation = NULL; + allocation = nullptr; } if(float_raw_image) { delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } if(data) { delete [] data; - data = NULL; + data = nullptr; } if(profile_data) { delete [] profile_data; - profile_data = NULL; + profile_data = nullptr; } } @@ -400,9 +400,9 @@ skip_block: int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); - image = NULL; + image = nullptr; verbose = settings->verbose; - oprof = NULL; + oprof = nullptr; ifp = gfopen (ifname); // Maps to either file map or direct fopen @@ -414,18 +414,18 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene thumb_length = 0; thumb_offset = 0; - thumb_load_raw = 0; + thumb_load_raw = nullptr; use_camera_wb = 0; highlight = 1; half_size = 0; - raw_image = 0; + raw_image = nullptr; //***************** Read ALL raw file info identify (); if (!is_raw) { fclose(ifp); - ifp = NULL; + ifp = nullptr; if (plistener) { plistener->setProgress(1.0 * progressRange); @@ -531,7 +531,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene crop_masked_pixels(); free (raw_image); - raw_image = NULL; + raw_image = nullptr; } else { if (cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; @@ -643,7 +643,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if ( closeFile ) { fclose(ifp); - ifp = NULL; + ifp = nullptr; } if (plistener) { @@ -656,7 +656,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene float** RawImage::compress_image() { if( !image ) { - return NULL; + return nullptr; } if (isBayer() || isXtrans()) { @@ -699,7 +699,7 @@ float** RawImage::compress_image() } delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } else if (filters != 0 && !isXtrans()) { #pragma omp parallel for @@ -733,7 +733,7 @@ float** RawImage::compress_image() } free(image); // we don't need this anymore - image = NULL; + image = nullptr; return data; } diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 45e67cbac..88ef5d710 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -106,7 +106,7 @@ public: explicit RawImage( const Glib::ustring &name ); ~RawImage(); - int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0); + int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0); void get_colorsCoeff( float* pre_mul_, float* scale_mul_, float* cblack_, bool forceAutoWB ); void set_prefilters() { diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 31deac244..9e90764b2 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -423,22 +423,22 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() - , plistener(NULL) + , plistener(nullptr) , border(4) - , ri(NULL) - , cache(NULL) + , ri(nullptr) + , cache(nullptr) , rawData(0, 0) , green(0, 0) , red(0, 0) , blue(0, 0) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; + hrmap[0] = nullptr; + hrmap[1] = nullptr; + hrmap[2] = nullptr; //needhr = NULL; //hpmap = NULL; - camProfile = NULL; - embProfile = NULL; + camProfile = nullptr; + embProfile = nullptr; rgbSourceModified = false; hlmax[0] = hlmax[1] = hlmax[2] = hlmax[3] = 0.f; clmax[0] = clmax[1] = clmax[2] = clmax[3] = 0.f; @@ -462,7 +462,7 @@ RawImageSource::~RawImageSource () delete [] cache; } - if (hrmap[0] != NULL) { + if (hrmap[0] != nullptr) { int dh = H / HR_SCALE; freeJaggedArray(hrmap[0]); freeJaggedArray(hrmap[1]); @@ -872,12 +872,12 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - DCPProfile *dcpProf = NULL; + DCPProfile *dcpProf = nullptr; cmsHPROFILE dummy; - findInputProfile(cmp.input, NULL, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); + findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); - if (dcpProf == NULL) { - return NULL; + if (dcpProf == nullptr) { + return nullptr; } dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); @@ -1629,7 +1629,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgress (1.0); } - plistener = NULL; // This must be reset, because only load() is called through progressConnector + plistener = nullptr; // This must be reset, because only load() is called through progressConnector t2.set(); if( settings->verbose ) { @@ -1648,7 +1648,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le t1.set(); Glib::ustring newDF = raw.dark_frame; - RawImage *rid = NULL; + RawImage *rid = nullptr; if (!raw.df_autoselect) { if( !raw.dark_frame.empty()) { @@ -1686,7 +1686,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } //FLATFIELD start - RawImage *rif = NULL; + RawImage *rif = nullptr; if (!raw.ff_AutoSelect) { if( !raw.ff_file.empty()) { @@ -1697,7 +1697,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - bool hasFlatField = (rif != NULL); + bool hasFlatField = (rif != nullptr); if( hasFlatField && settings->verbose) { printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); @@ -1723,7 +1723,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } // If darkframe selected, correct hotpixels found on darkframe - bp = 0; + bp = nullptr; if( raw.df_autoselect ) { bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS()); @@ -2305,7 +2305,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC dLcurve(32768); } - FlatCurve* chcurve = NULL;//curve c=f(H) + FlatCurve* chcurve = nullptr;//curve c=f(H) bool chutili = false; if (deh.enabled && deh.retinexMethod == "highli") { @@ -2314,7 +2314,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC if (!chcurve || chcurve->isIdentity()) { if (chcurve) { delete chcurve; - chcurve = NULL; + chcurve = nullptr; } } else { chutili = true; @@ -2629,7 +2629,7 @@ void RawImageSource::flushRawData() { if(cache) { delete [] cache; - cache = 0; + cache = nullptr; } if (rawData) { @@ -3696,9 +3696,9 @@ void RawImageSource::getProfilePreprocParams(cmsHPROFILE in, float& gammaFac, fl copyright[0] = 0; if (cmsGetProfileInfoASCII(in, cmsInfoCopyright, cmsNoLanguage, cmsNoCountry, copyright, 256) > 0) { - if (strstr(copyright, "Phase One") != NULL) { + if (strstr(copyright, "Phase One") != nullptr) { gammaFac = 0.55556; // 1.8 - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { gammaFac = 0.5; lineFac = -0.4; lineSum = 1.35; // determined in reverse by measuring NX an RT developed colorchecker PNGs @@ -3767,7 +3767,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (dcpProf != NULL) { + if (dcpProf != nullptr) { // DCP processing const DCPProfile::Triple pre_mul_row = { pre_mul[0], @@ -3784,7 +3784,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (in == NULL) { + if (in == nullptr) { // use default camprofile, supplied by dcraw // in this case we avoid using the slllllooooooowwww lcms @@ -3860,10 +3860,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam camera_icc_type = CAMERA_ICC_TYPE_GENERIC; // Note: order the identification with the most detailed matching first since the more general ones may also match the more detailed - if ((strstr(copyright, "Leaf") != NULL || - strstr(copyright, "Phase One A/S") != NULL || - strstr(copyright, "Kodak") != NULL || - strstr(copyright, "Creo") != NULL) && + if ((strstr(copyright, "Leaf") != nullptr || + strstr(copyright, "Phase One A/S") != nullptr || + strstr(copyright, "Kodak") != nullptr || + strstr(copyright, "Creo") != nullptr) && (strstr(description, "LF2 ") == description || strstr(description, "LF3 ") == description || strstr(description, "LeafLF2") == description || @@ -3872,9 +3872,9 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam strstr(description, "MamiyaLF2") == description || strstr(description, "MamiyaLF3") == description)) { camera_icc_type = CAMERA_ICC_TYPE_LEAF; - } else if (strstr(copyright, "Phase One A/S") != NULL) { + } else if (strstr(copyright, "Phase One A/S") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_PHASE_ONE; - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_NIKON; } } @@ -3893,7 +3893,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam transform_via_pcs_lab = true; separate_pcs_lab_highlights = true; // We transform to Lab because we can and that we avoid getting an unnecessary unmatched gamma conversion which we would need to revert. - hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, NULL, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, nullptr, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { @@ -3917,7 +3917,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); - if (hTransform == NULL) { + if (hTransform == nullptr) { // Fallback: create transform from camera profile. Should not happen normally. lcmsMutex->lock (); hTransform = cmsCreateTransform (camprofile, TYPE_RGB_FLT, prophoto, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); @@ -4127,8 +4127,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Determine RAW input and output profiles. Returns TRUE on success bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in) { - in = NULL; // cam will be taken on NULL - *dcpProf = NULL; + in = nullptr; // cam will be taken on NULL + *dcpProf = nullptr; if (inProfile == "(none)") { return false; @@ -4140,7 +4140,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed // DCPs have higher quality, so use them first *dcpProf = DCPStore::getInstance()->getStdProfile(camName); - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { @@ -4154,7 +4154,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getProfile(normalName); } - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getProfile (inProfile); } } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 60887d9cd..6dcc69360 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -138,7 +138,7 @@ public: void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw); eSensorType getSensorType () const { - return ri != NULL ? ri->getSensorType() : ST_NONE; + return ri != nullptr ? ri->getSensorType() : ST_NONE; } ColorTemp getWB () const { diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 42e06406e..10a42a0d5 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -176,7 +176,7 @@ public: * @param errorCode is a pointer to a variable that is set to nonzero if an error happened (output) * @param pl is a pointer pointing to an object implementing a progress listener. It can be NULL, in this case progress is not reported. * @return an object representing the loaded and pre-processed image */ - static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = NULL); + static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = nullptr); }; /** When the preview image is ready for display during staged processing (thus the changes have been updated), @@ -482,7 +482,7 @@ public: * @param pl is an optional ProgressListener if you want to keep track of the progress * @param tunnelMetaData tunnels IPTC and XMP to output without change * @return the resulting image, with the output profile applied, exif and iptc data set. You have to save it or you can access the pixel data directly. */ -IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = NULL, bool tunnelMetaData = false, bool flush = false); +IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = nullptr, bool tunnelMetaData = false, bool flush = false); /** This class is used to control the batch processing. The class implementing this interface will be called when the full processing of an * image is ready and the next job to process is needed. */ diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index c16960041..acdeb5133 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -54,7 +54,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (errorCode) { delete job; - return NULL; + return nullptr; } } @@ -165,7 +165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; - Imagefloat *calclum = NULL ; + Imagefloat *calclum = nullptr ; params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// @@ -754,7 +754,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } // update blurmap - SHMap* shmap = NULL; + SHMap* shmap = nullptr; if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); @@ -858,7 +858,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -881,13 +881,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Freeing baseImg because not used anymore delete baseImg; - baseImg = NULL; + baseImg = nullptr; if (shmap) { delete shmap; } - shmap = NULL; + shmap = nullptr; if (pl) { pl->setProgress (0.55); @@ -933,7 +933,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - ipf.chromiLuminanceCurve (NULL, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { ipf.EPDToneMap(labView, 5, 1); @@ -1071,7 +1071,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete cieView; - cieView = NULL; + cieView = nullptr; @@ -1147,8 +1147,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - Image16* readyImg = NULL; - cmsHPROFILE jprof = NULL; + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; bool customGamma = false; bool useLCMS = false; @@ -1249,14 +1249,14 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p jprof = iccStore->getProfile(outProfile); //get output profile - if (jprof == NULL) { + if (jprof == nullptr) { useLCMS = true; if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); } } else { - cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; + cmsToneCurve* GammaTRC[3] = { nullptr, nullptr, nullptr }; cmsFloat64Number Parameters[7]; @@ -1279,7 +1279,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // instruction with //ICC are used for generate icc profile - if (DescriptionMLU == NULL) { + if (DescriptionMLU == nullptr) { printf("Description error\n"); } @@ -1331,7 +1331,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU); // Calculate output profile's rTRC bTRC gTRC - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); cmsWriteTag(jprof, cmsSigGreenTRCTag, (void*)GammaTRC[1] ); cmsWriteTag(jprof, cmsSigRedTRCTag, (void*)GammaTRC[0] ); cmsWriteTag(jprof, cmsSigBlueTRCTag, (void*)GammaTRC[2] ); @@ -1365,7 +1365,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete labView; - labView = NULL; + labView = nullptr; @@ -1426,7 +1426,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if iccStore->getProfile send back an object, then iccStore->getContent will do too cmsHPROFILE jprof = iccStore->getProfile(outputProfile); //get outProfile - if (jprof == NULL) { + if (jprof == nullptr) { if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", outputProfile.c_str()); } @@ -1440,7 +1440,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } else { // No ICM - readyImg->setOutputProfile (NULL, 0); + readyImg->setOutputProfile (nullptr, 0); } } @@ -1483,13 +1483,13 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo if (errorCode) { bpl->error (M("MAIN_MSG_CANNOTLOAD")); - currentJob = NULL; + currentJob = nullptr; } else { try { currentJob = bpl->imageReady (img); } catch (Glib::Exception& ex) { bpl->error (ex.what()); - currentJob = NULL; + currentJob = nullptr; } } } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index e422d23b2..128bfdfa9 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,15 +51,15 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL) +StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - needhr = NULL; - embProfile = NULL; - idata = NULL; + hrmap[0] = nullptr; + hrmap[1] = nullptr; + hrmap[2] = nullptr; + needhr = nullptr; + embProfile = nullptr; + idata = nullptr; } StdImageSource::~StdImageSource () @@ -67,7 +67,7 @@ StdImageSource::~StdImageSource () delete idata; - if (hrmap[0] != NULL) { + if (hrmap[0] != nullptr) { int dh = img->getH() / HR_SCALE; freeArray(hrmap[0], dh); freeArray(hrmap[1], dh); @@ -178,7 +178,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) if (error) { delete img; - img = NULL; + img = nullptr; return error; } @@ -243,7 +243,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement { bool skipTransform = false; - cmsHPROFILE in = NULL; + cmsHPROFILE in = nullptr; cmsHPROFILE out = iccStore->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { @@ -260,9 +260,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (cmp.input != "(none)") { in = iccStore->getProfile (cmp.input); - if (in == NULL && embedded) { + if (in == nullptr && embedded) { in = embedded; - } else if (in == NULL) { + } else if (in == nullptr) { if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index 048f3b3c0..e6ecf80a7 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -78,7 +78,7 @@ public: } ImageMatrices* getImageMatrices () { - return (ImageMatrices*)NULL; + return (ImageMatrices*)nullptr; } bool isRAW() const { diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index 41ab468cb..7fa01f624 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -1780,205 +1780,205 @@ public: CAAspectRatioInterpreter caAspectRatioInterpreter; const TagAttrib canonCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "Quality", &caQualityInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "CameraISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AFPoint", &caAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "LensID", &caLensInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "LongFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ShortFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocalUnits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "MaxAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "MinAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "FlashActivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "AESetting", &caAESettingsInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "DisplayAperture", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "ColorTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "Quality", &caQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "CameraISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AFPoint", &caAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "LensID", &caLensInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "LongFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ShortFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocalUnits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "MaxAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "MinAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "FlashActivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "AESetting", &caAESettingsInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "DisplayAperture", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "ColorTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonFocalLengthAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FocalLength", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FocalLength", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonShotInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AutoISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "MeasuredEV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "TargetAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEBBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "ControlMode", &caControModeInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FNumber" , &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "BulbDuration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "NDFilter", &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Self-timer2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashOutput", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AutoISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "MeasuredEV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "TargetAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEBBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "ControlMode", &caControModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FNumber" , &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "BulbDuration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "NDFilter", &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Self-timer2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashOutput", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonFileInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonProcessingInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "SensorRedLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "DigitalGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBShiftAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBShiftGM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "SensorRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "DigitalGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBShiftAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBShiftGM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonPanoramaInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonCropInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "CropLeftMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CropRightMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CropTopMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "CropBottomMargin", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "CropLeftMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CropRightMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CropTopMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "CropBottomMargin", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonAspectInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonMicroAdjustAttrib[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 2, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 2, AUTO, "", nullptr}, }; const TagAttrib canonAttribs[] = { {0, AC_WRITE, 0, canonCameraSettingsAttribs, 0x0001, AUTO, "CanonCameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, canonFocalLengthAttribs, 0x0002, AUTO, "CanonFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonShotInfoAttribs, 0x0004, AUTO, "CanonShotInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonPanoramaInfoAttribs, 0x0005, AUTO, "CanonPanorama", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FileNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "OwnerName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "MyColors", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FileNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "OwnerName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "MyColors", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, {0, AC_WRITE, 0, canonFileInfoAttribs, 0x0093, AUTO, "CanonFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, - {0, AC_WRITE, 0, 0, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, {0, AC_WRITE, 0, canonCropInfoAttribs, 0x0098, AUTO, "CropInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, {0, AC_WRITE, 0, canonAspectInfoAttribs, 0x009a, AUTO, "AspectInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonProcessingInfoAttribs, 0x00a0, AUTO, "ProcessingInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_NEW , 0, 0, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_NEW , 0, nullptr, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, {1, AC_WRITE, 0, canonMicroAdjustAttrib, 0x4013, AUTO, "AFMicroAdj", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index 311e47ad6..aabd88859 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -268,44 +268,44 @@ FAPictureModeInterpreter faPictureModeInterpreter; const TagAttrib fujiAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "Version", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, - {0, AC_WRITE, 0, 0, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8000, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "Version", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8000, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/kodakattribs.cc b/rtexif/kodakattribs.cc index 678dae114..c92be3a84 100644 --- a/rtexif/kodakattribs.cc +++ b/rtexif/kodakattribs.cc @@ -25,7 +25,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) char *p = value; char *pc, *plf; - while ((pc = strchr(p, ':')) != NULL && (plf = strchr(pc, '\n')) != NULL) { + while ((pc = strchr(p, ':')) != nullptr && (plf = strchr(pc, '\n')) != nullptr) { while (*p == ' ') { p++; } @@ -98,7 +98,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) const char *p1 = strchr(val.c_str(), '/'); int a, b; - if (p1 == NULL) { + if (p1 == nullptr) { a = atoi(val.c_str()); b = 1; } else { @@ -135,31 +135,31 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) // table not complete, not all proprietary Kodak tags are known const TagAttrib kodakIfdAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fd, AUTO, "Processing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1784, AUTO, "ISO", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fd, AUTO, "Processing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1784, AUTO, "ISO", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; } diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index a827eb1fe..01b825882 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -1085,99 +1085,99 @@ public: NALensDataInterpreter naLensDataInterpreter; const TagAttrib nikonISOInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Focus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "Unknown", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Focus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "Unknown", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon3Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "FlashType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "DataDump", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "FlashType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "DataDump", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, {0, AC_WRITE, 0, nikonISOInfoAttribs, 0x0025, AUTO, "ISOInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0081, AUTO, "ToneComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0084, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, - {0, AC_WRITE, 0, 0, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "LensFStops", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008d, AUTO, "ColorHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008f, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "LightSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0081, AUTO, "ToneComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0084, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "LensFStops", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008d, AUTO, "ColorHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008f, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "LightSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 35e390b88..4b61225a0 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -535,304 +535,304 @@ public: OLFlashModelInterpreter olFlashModelInterpreter; const TagAttrib olyFocusInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0308, AUTO, "AFPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0308, AUTO, "AFPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyImageProcessingAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "Enhancer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0311, AUTO, "CoringValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0610, AUTO, "GainBase", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0611, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0612, AUTO, "CropLeft", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0613, AUTO, "CropTop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0614, AUTO, "CropWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0615, AUTO, "CropHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, - {1, AC_WRITE, 0, 0, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "Enhancer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0311, AUTO, "CoringValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0610, AUTO, "GainBase", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0611, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0612, AUTO, "CropLeft", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0613, AUTO, "CropTop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0614, AUTO, "CropWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0615, AUTO, "CropHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopment2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "AFSearch", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "AFAreas", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0400, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x050f, AUTO, "Gradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "DriveMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "AFSearch", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "AFAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0400, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050f, AUTO, "Gradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "DriveMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyEquipmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "CameraType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "LensProperties", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "Extender", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "CameraType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "LensProperties", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "Extender", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olympusAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "CameraType", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0208, AUTO, "TextInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "CameraID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0405, AUTO, "Firmware", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "ISOValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1009, AUTO, "LightCondition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "FocusRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100f, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1015, AUTO, "WBMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1017, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, - {0, AC_WRITE, 0, 0, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1029, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102b, AUTO, "ColorControl", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102c, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1038, AUTO, "AFResult", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103f, AUTO, "FieldCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "CameraType", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0208, AUTO, "TextInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "CameraID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0405, AUTO, "Firmware", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "ISOValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1009, AUTO, "LightCondition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "FocusRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100f, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1015, AUTO, "WBMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1017, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1029, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102b, AUTO, "ColorControl", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102c, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1038, AUTO, "AFResult", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103f, AUTO, "FieldCount", &stdInterpreter}, {0, AC_WRITE, 0, olyEquipmentAttribs, 0x2010, AUTO, "Equipment", &stdInterpreter}, {0, AC_WRITE, 0, olyCameraSettingsAttribs, 0x2020, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopmentAttribs, 0x2030, AUTO, "RawDevelopment", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopment2Attribs, 0x2031, AUTO, "RawDev2", &stdInterpreter}, {0, AC_WRITE, 0, olyImageProcessingAttribs, 0x2040, AUTO, "ImageProcessing", &stdInterpreter}, {0, AC_WRITE, 0, olyFocusInfoAttribs, 0x2050, AUTO, "FocusInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x3000, AUTO, "RawInfo", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {1, AC_WRITE, 0, nullptr, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x3000, AUTO, "RawInfo", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index 4d3cef90d..9fc6b6fb6 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -980,7 +980,7 @@ public: } virtual std::string toString (Tag* t) { - double *liArray = NULL; + double *liArray = nullptr; double maxApertureAtFocal = 0.; double focalLength = 0.; int lensID = 256 * t->toInt(0, BYTE) + t->toInt(1, BYTE); @@ -1962,236 +1962,236 @@ public: PADriveMode2Interpreter paDriveMode2Interpreter; const TagAttrib pentaxAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Date", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Quality", &paQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "ISO", &paISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "LightReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0023, AUTO, "HometownCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "HometownDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, - {0, AC_WRITE, 0, 0, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 0x004f, AUTO, "ImageTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Date", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Quality", &paQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "ISO", &paISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "LightReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0023, AUTO, "HometownCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "HometownDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, + {0, AC_WRITE, 0, nullptr, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004f, AUTO, "ImageTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, {0, AC_WRITE, 0, pentaxSRInfoAttribs, 0x005c, AUTO, "ShakeReductionInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, - {0, AC_WRITE, 0, 0, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, - {0, AC_WRITE, 0, 0, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, - {0, AC_WRITE, 0, 0, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, {0, AC_WRITE, 0, pentaxLensCorrAttribs, 0x007d, AUTO, "LensCorr", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "HDR", &paHDRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "ISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "HDR", &paHDRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "ISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraSettingsAttribs, 0x0205, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, pentaxAEInfoAttribs, 0x0206, AUTO, "AEInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensDataAttribs, 0x0207, AUTO, "LensInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxFlashInfoAttribs, 0x0208, AUTO, "FlashInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "FlashADump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "FlashADump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraInfoAttribs, 0x0215, AUTO, "CameraInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxBatteryInfoAttribs, 0x0216, AUTO, "BatteryInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x021f, AUTO, "AFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x021f, AUTO, "AFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensInfoQAttribs, 0x0239, AUTO, "LensInfoQ", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fe, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x03fe, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SRFocalLength", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SRFocalLength", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensDataAttribs[] = { - {0, AC_WRITE, 0, 0, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensInfoQAttribs[] = { - {0, AC_WRITE, 0, 0, 12, AUTO, "LensModel", &paLensModelQInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 12, AUTO, "LensModel", &paLensModelQInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensCorrAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AFMode", &paAFModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AFMode", &paAFModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "AEMeteringMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "AEMeteringMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 8, SBYTE, "AEError", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, SBYTE, "AEError", &stdInterpreter}, //{0, AC_WRITE, 0, 0, 11, AUTO, "AEApertureSteps", &}, - {0, AC_WRITE, 0, 0, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo3Attribs[] = { - {0, AC_WRITE, 0, 0, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxFlashInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxBatteryInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "BatteryStates", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "BatteryStates", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ManufactureDate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ProductionCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ManufactureDate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ProductionCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index a13e9cae8..64ddd0ee3 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -47,7 +47,7 @@ Interpreter stdInterpreter; #define TAG_SUBFILETYPE 0x00fe TagDirectory::TagDirectory () - : attribs(ifdAttribs), order(HOSTORDER), parent(NULL) {} + : attribs(ifdAttribs), order(HOSTORDER), parent(nullptr) {} TagDirectory::TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border) : attribs(ta), order(border), parent(p) {} @@ -141,7 +141,7 @@ const TagAttrib* TagDirectory::getAttrib (int id) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttrib (const char* name) @@ -153,7 +153,7 @@ const TagAttrib* TagDirectory::getAttrib (const char* name) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttribP (const char* name) @@ -179,7 +179,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getAttribP(n + 1); } else { - return NULL; + return nullptr; } } else { return &attribs[i]; @@ -187,7 +187,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) } } - return NULL; + return nullptr; } void TagDirectory::printAll (unsigned int level) const @@ -263,13 +263,13 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring std::vector tagDirList; std::vector tagDirPaths; - FILE *f = NULL; + FILE *f = nullptr; if (!keyFile) { // open the file in write mode f = g_fopen (commFName.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { printf("TagDirectory::keyFileDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str()); delete kf; return false; @@ -396,7 +396,7 @@ Tag* TagDirectory::getTag (int ID) const return tags[i]; } - return NULL; + return nullptr; } Tag* TagDirectory::getTag (const char* name) const @@ -409,7 +409,7 @@ Tag* TagDirectory::getTag (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::getTagP (const char* name) const @@ -435,7 +435,7 @@ Tag* TagDirectory::getTagP (const char* name) const if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getTagP(n + 1); } else { - return NULL; + return nullptr; } } else { return getTag (attribs[i].ID); @@ -443,7 +443,7 @@ Tag* TagDirectory::getTagP (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::findTag (const char* name) const @@ -471,7 +471,7 @@ Tag* TagDirectory::findTag (const char* name) const } } - return NULL; + return nullptr; } // Searches a simple value, as either attribute or element @@ -615,7 +615,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // this is a final segment: apply change if (dp == std::string::npos) { - Tag* t = NULL; + Tag* t = nullptr; for (size_t i = 0; i < tags.size(); i++) if (tags[i]->nameToString() == fseg) { @@ -630,7 +630,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } else if (t && !t->isDirectory()) { t->valueFromString (value); } else { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -650,7 +650,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // try to find it std::string::size_type dp1 = fseg.find_first_of ('['); std::string basename = fseg.substr (0, dp1); - Tag* t = NULL; + Tag* t = nullptr; int dirnum = -1; for (size_t i = 0; i < tags.size(); i++) @@ -670,7 +670,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } if (!t && value != "#keep" && value != "#delete") { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -760,7 +760,7 @@ int TagDirectoryTable::write (int start, unsigned char* buffer) //----------------------------------------------------------------------------- Tag::Tag (TagDirectory* p, FILE* f, int base) - : type(INVALID), count(0), value(NULL), allocOwnMemory(true), attrib(NULL), parent(p), directory(NULL) + : type(INVALID), count(0), value(nullptr), allocOwnMemory(true), attrib(nullptr), parent(p), directory(nullptr) { ByteOrder order = getOrder(); @@ -830,7 +830,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) fread (buffer, 1, 2, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp(buffer, "MM", 2) ? INTEL : MOTOROLA); - directory[1] = NULL; + directory[1] = nullptr; } else /* SONY uses this tag to write hidden info and pointer to private encrypted tags { @@ -876,7 +876,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch( tag ) { case 0x0010: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 15360) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraInfoAttribs, order); @@ -888,7 +888,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0114: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 280 || count == 364) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , sonyCameraSettingsAttribs, MOTOROLA); @@ -899,7 +899,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown CameraSettings delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -908,7 +908,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x9405: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -923,21 +923,21 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0208: case 0x0216: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x0215: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x005c: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 4) { // SRInfo directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxSRInfoAttribs, order); @@ -946,7 +946,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown SRInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -955,7 +955,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0206: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 21) { // AEInfo2 directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfo2Attribs, order); @@ -966,7 +966,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown AEInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -990,7 +990,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, offsetFirst, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; } @@ -998,7 +998,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0239: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1016,7 +1016,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0098: case 0x00a0: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SSHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1024,7 +1024,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x009a: case 0x4013: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1036,7 +1036,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch (tag) { case 0x0025: { directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1050,7 +1050,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) type = LONG; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, attrib->subdirAttribs, order); - directory[1] = NULL; + directory[1] = nullptr; } else { goto defsubdirs; } @@ -1090,7 +1090,7 @@ defsubdirs: } // set the terminating NULL - directory[sdcount] = NULL; + directory[sdcount] = nullptr; } else { type = INVALID; } @@ -1103,7 +1103,7 @@ defsubdirs: bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) { - value = NULL; + value = nullptr; Tag* tmake = parent->getRoot()->findTag("Make"); std::string make( tmake ? tmake->valueToString() : ""); @@ -1123,13 +1123,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 8, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( model.find("NIKON E990") != std::string::npos || (model.find("NIKON D1") != std::string::npos && model.size() > 8 && model.at(8) != '0')) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else { // needs refinement! (embedded tiff header parsing) makerNoteKind = NIKON3; @@ -1145,13 +1145,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) else MakerNoteOrder = rtexif::INTEL; directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, MakerNoteOrder); - directory[1] = NULL; + directory[1] = nullptr; } } else if ( make.find( "Canon" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, canonAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "PENTAX" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 6; @@ -1159,7 +1159,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 6, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( (make.find( "RICOH" ) != std::string::npos ) && (model.find("PENTAX") != std::string::npos) ) { makerNoteKind = HEADERIFD; valuesize = 10; @@ -1167,7 +1167,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 10, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell (f) - 10, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "FUJIFILM" ) != std::string::npos ) { makerNoteKind = FUJI; valuesize = 12; @@ -1175,12 +1175,12 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 12, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell(f) - 12, fujiAttribs, INTEL); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "KONICA MINOLTA" ) != std::string::npos || make.find( "Minolta" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "SONY" ) != std::string::npos ) { valuesize = 12; value = new unsigned char[12]; @@ -1195,14 +1195,14 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, sonyAttribs, bom ); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "OLYMPUS" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[12]; fread (value, 1, 8, f); directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (!strncmp((char*)value, "OLYMPUS", 7)) { makerNoteKind = OLYMPUS2; @@ -1234,7 +1234,7 @@ Tag* Tag::clone (TagDirectory* parent) t->value = new unsigned char [valuesize]; memcpy (t->value, value, valuesize); } else { - value = NULL; + value = nullptr; } t->makerNoteKind = makerNoteKind; @@ -1250,9 +1250,9 @@ Tag* Tag::clone (TagDirectory* parent) t->directory[i] = directory[i]->clone (parent); } - t->directory[ds] = NULL; + t->directory[ds] = nullptr; } else { - t->directory = NULL; + t->directory = nullptr; } return t; @@ -1719,26 +1719,26 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) } Tag::Tag (TagDirectory* p, const TagAttrib* attr) - : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { } Tag::Tag (TagDirectory* p, const TagAttrib* attr, int data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initInt (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, unsigned char *data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initType (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, const char* text) - : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initString (text); @@ -1795,8 +1795,8 @@ void Tag::initSubDir () value = new unsigned char[4]; setInt (0); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : NULL, parent->getOrder()); - directory[1] = NULL; + directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : nullptr, parent->getOrder()); + directory[1] = nullptr; } void Tag::initSubDir (TagDirectory* dir) @@ -1808,7 +1808,7 @@ void Tag::initSubDir (TagDirectory* dir) setInt (0); directory = new TagDirectory*[2]; directory[0] = dir; - directory[1] = NULL; + directory[1] = nullptr; } void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) @@ -1820,7 +1820,7 @@ void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) setInt (0); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, ta, parent->getOrder()); - directory[1] = NULL; + directory[1] = nullptr; makerNoteKind = mnk; } @@ -1864,14 +1864,14 @@ const TagAttrib* lookupAttrib (const TagAttrib* dir, const char* field) return &dir[i]; } - return 0; + return nullptr; } TagDirectory* ExifManager::parseCIFF (FILE* f, int base, int length) { - TagDirectory* root = new TagDirectory (NULL, ifdAttribs, INTEL); + TagDirectory* root = new TagDirectory (nullptr, ifdAttribs, INTEL); Tag* exif = new Tag (root, lookupAttrib(ifdAttribs, "Exif")); exif->initSubDir (); Tag* mn = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "MakerNote")); @@ -1920,7 +1920,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) TagDirectory* exif = root->getTag("Exif")->getDirectory(); - time_t timestamp = time (NULL); + time_t timestamp = time (nullptr); for (int i = 0; i < numOfTags; i++) { @@ -2149,7 +2149,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) exif->addTag (t); } - if (timestamp != time(NULL)) { + if (timestamp != time(nullptr)) { struct tm* tim = localtime (×tamp); strftime (buffer, 20, "%Y:%m:%d %H:%M:%S", tim); t = new Tag (exif, lookupAttrib(exifAttribs, "DateTimeOriginal")); @@ -2301,21 +2301,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) // Quick-and-dirty value extractor, no real xml parsing. // We could make it more generic, but we just get most important // values we know use to be in there. - if ((p = strstr(xmp, "xmlns:tiff")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:tiff")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "initString (val); } - if (p1 != NULL) { + if (p1 != nullptr) { *p1 = '('; } } else { @@ -2365,21 +2365,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) *end = '<'; } - if ((p = strstr(xmp, "xmlns:exif")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:exif")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "getTag ("Make"); @@ -2548,7 +2548,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) if (!exif) { // old Kodak cameras may have exif tags in IFD0, reparse and create an exif subdir fseek (f, base + firstifd, SEEK_SET); - TagDirectory* exifdir = new TagDirectory (NULL, f, base, exifAttribs, order, true); + TagDirectory* exifdir = new TagDirectory (nullptr, f, base, exifAttribs, order, true); exif = new Tag (root, root->getAttrib ("Exif")); exif->initSubDir(exifdir); @@ -2591,7 +2591,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) tethered. In single-shot mode they should be exactly the same as the single-shot models. */ Tag *subd = root->getTag(0x14a); - Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : 0; + Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : nullptr; int sensorWidth = (iw) ? iw->toInt() : 0; Tag* tmodel = root->getTag ("Model"); const char *model = (tmodel) ? (const char *)tmodel->getValue() : ""; @@ -2767,7 +2767,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) if (fread (&c, 1, 1, f) && c == 0xe1) { // APP1 marker found if (fread (idbuff, 1, 8, f) < 8) { - return NULL; + return nullptr; } if (!memcmp(idbuff + 2, exifid, 6)) { // Exif info found @@ -2777,7 +2777,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) } } - return NULL; + return nullptr; } TagDirectory* ExifManager::parseTIFF (FILE* f, bool skipIgnored) @@ -2831,9 +2831,9 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); } else { - cl = new TagDirectory (NULL, ifdAttribs, INTEL); + cl = new TagDirectory (nullptr, ifdAttribs, INTEL); } for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { @@ -2874,7 +2874,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); // remove some unknown top level tags which produce warnings when opening a tiff Tag *removeTag = cl->getTag(0x9003); if(removeTag) @@ -2883,7 +2883,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro if(removeTag) removeTag->setKeep(false); } else { - cl = new TagDirectory (NULL, ifdAttribs, HOSTORDER); + cl = new TagDirectory (nullptr, ifdAttribs, HOSTORDER); } // add tiff strip data diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 02d357a5d..e1d8ede6e 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -157,7 +157,7 @@ public: virtual void printAll (unsigned int level = 0) const; // reentrant debug function, keep level=0 on first call ! virtual bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams, - const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = NULL, Glib::ustring tagDirName = "") const; + const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = nullptr, Glib::ustring tagDirName = "") const; virtual void sort (); }; @@ -293,11 +293,11 @@ public: // get subdirectory (there can be several, the last is NULL) bool isDirectory () { - return directory != NULL; + return directory != nullptr; } TagDirectory* getDirectory (int i = 0) { - return (directory) ? directory[i] : 0; + return (directory) ? directory[i] : nullptr; } MNKind getMakerNoteFormat () diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 80db5018f..adb19c969 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -1067,7 +1067,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -1173,7 +1173,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -2253,226 +2253,226 @@ public: SAColorTemperatureSettingInterpreter saColorTemperatureSettingInterpreter; const TagAttrib minoltaAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyAttribs[] = { {0, AC_WRITE, 0, sonyCameraInfoAttribs, 0x0010, AUTO, "CameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "Quality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "Quality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, {0, AC_WRITE, 0, sonyCameraSettingsAttribs, 0x0114, AUTO, "SonyCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, - {0, AC_WRITE, 0, 0, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, - {0, AC_WRITE, 0, 0, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, + {0, AC_WRITE, 0, nullptr, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, {0, AC_WRITE, 0, minoltaAttribs, 0xb028, AUTO, "MinoltaMakerNote", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb042, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 0xb043, AUTO, "AFMode", &saAFMode}, - {0, AC_WRITE, 0, 0, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 0xb047, AUTO, "Quality", &saQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, - {0, AC_WRITE, 0, 0, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb042, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 0xb043, AUTO, "AFMode", &saAFMode}, + {0, AC_WRITE, 0, nullptr, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 0xb047, AUTO, "Quality", &saQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, + {0, AC_WRITE, 0, nullptr, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, {0, AC_WRITE, 0, sonyTag9405Attribs, 0x9405, AUTO, "Tag9405", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyTag9405Attribs[] = { - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here - {0, AC_WRITE, 0, 0, 0x005e, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0060, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0062, SHORT, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here - {0, AC_WRITE, 0, 0, 0x0604, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0605, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0608, SHORT, "LensType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here + {0, AC_WRITE, 0, nullptr, 0x005e, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0060, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0062, SHORT, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here + {0, AC_WRITE, 0, nullptr, 0x0604, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0605, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0608, SHORT, "LensType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "DriveMode", &saDriveMode}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "FocusModeSetting", &saFocusMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AFPointSelected", &saAFPointSelected}, - {0, AC_WRITE, 0, 0, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CreativeStyle", &saCreativeStyle}, - {0, AC_WRITE, 0, 0, 28, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, - {0, AC_WRITE, 0, 0, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 77, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "DriveMode", &saDriveMode}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "FocusModeSetting", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AFPointSelected", &saAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CreativeStyle", &saCreativeStyle}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 77, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs2[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, - {0, AC_WRITE, 0, 0, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, - {0, AC_WRITE, 0, 0, 25, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - {0, AC_WRITE, 0, 0, 126, AUTO, "DriveMode", &saDriveMode2}, - {0, AC_WRITE, 0, 0, 131, AUTO, "ColorSpace", &saColorSpace5_6}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + {0, AC_WRITE, 0, nullptr, 126, AUTO, "DriveMode", &saDriveMode2}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "ColorSpace", &saColorSpace5_6}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs3[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "DriveModeSetting", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ExposureProgram", &saExposureProgram2}, - {0, AC_WRITE, 0, 0, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, - {0, AC_WRITE, 0, 0, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AspectRatio", &saAspectRatio2}, - {0, AC_WRITE, 0, 0, 11, AUTO, "Quality", &saQualityInterpreter3}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, - {0, AC_WRITE, 0, 0, 14, AUTO, "ColorSpace", &saColorSpace1_2}, - {0, AC_WRITE, 0, 0, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, - {0, AC_WRITE, 0, 0, 16, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FlashMode", &saFlashMode2}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashControl", &saFlashControl}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, - {0, AC_WRITE, 0, 0, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, - {0, AC_WRITE, 0, 0, 46, AUTO, "HDRLevel", &saHDRLevel}, - {0, AC_WRITE, 0, 0, 47, AUTO, "ViewingMode", &saViewingMode}, - {0, AC_WRITE, 0, 0, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, - {0, AC_WRITE, 0, 0, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, - {0, AC_WRITE, 0, 0, 52, AUTO, "DriveMode", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, - {0, AC_WRITE, 0, 0, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, - {0, AC_WRITE, 0, 0, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, - {0, AC_WRITE, 0, 0, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 133, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 134, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 135, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 153, AUTO, "LensMount", &saLensMount}, - {0, AC_WRITE, 0, 0, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 645, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 646, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 647, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 1015, SHORT, "LensType2", &saLensID2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "DriveModeSetting", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ExposureProgram", &saExposureProgram2}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AspectRatio", &saAspectRatio2}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "Quality", &saQualityInterpreter3}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "ColorSpace", &saColorSpace1_2}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FlashMode", &saFlashMode2}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashControl", &saFlashControl}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "HDRLevel", &saHDRLevel}, + {0, AC_WRITE, 0, nullptr, 47, AUTO, "ViewingMode", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, + {0, AC_WRITE, 0, nullptr, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, + {0, AC_WRITE, 0, nullptr, 52, AUTO, "DriveMode", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, + {0, AC_WRITE, 0, nullptr, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, + {0, AC_WRITE, 0, nullptr, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 133, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 134, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 135, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 153, AUTO, "LensMount", &saLensMount}, + {0, AC_WRITE, 0, nullptr, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 645, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 646, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 647, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 1015, SHORT, "LensType2", &saLensID2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; /*const TagAttrib sonyDNGMakerNote[]={ diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 98594e64c..2bd7a60f7 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -528,282 +528,282 @@ public: UTF8BinInterpreter utf8BinInterpreter; const TagAttrib exifAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, - {0, AC_WRITE, 0, 0, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8828, AUTO, "OECF", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, - {0, AC_WRITE, 0, 0, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, - {0, AC_WRITE, 0, 0, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0x9209, AUTO, "Flash", &flashInterpreter}, - {0, AC_WRITE, 0, 0, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way - {0, AC_DONTWRITE, 0, 0, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x927C, AUTO, "MakerNote", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, - {0, AC_WRITE, 0, 0, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8828, AUTO, "OECF", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9209, AUTO, "Flash", &flashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way + {0, AC_DONTWRITE, 0, nullptr, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x927C, AUTO, "MakerNote", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, {0, AC_SYSTEM, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files - {0, AC_WRITE, 0, 0, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA300, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA301, AUTO, "SceneType", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, - {0, AC_WRITE, 0, 0, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, - {0, AC_WRITE, 0, 0, 0xA408, AUTO, "Contrast", &contrastInterpreter}, - {0, AC_WRITE, 0, 0, 0xA409, AUTO, "Saturation", &saturationInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA432, AUTO, "LensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA433, AUTO, "LensMake", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA434, AUTO, "LensModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA500, AUTO, "Gamma", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA300, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA301, AUTO, "SceneType", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA408, AUTO, "Contrast", &contrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA409, AUTO, "Saturation", &saturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA432, AUTO, "LensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA433, AUTO, "LensMake", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA434, AUTO, "LensModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA500, AUTO, "Gamma", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC68F, AUTO, "AsShotICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC691, AUTO, "CurrentICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC71E, AUTO, "SubTileBlockSize", & ???}, // {0, AC_WRITE, 0, 0, 0xC71F, AUTO, "RowInterleaveFactor", & ???}, - {0, AC_WRITE, 0, 0, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC740, AUTO, "OpcodeList1", & ???}, // {0, AC_WRITE, 0, 0, 0xC741, AUTO, "OpcodeList2", & ???}, // {0, AC_WRITE, 0, 0, 0xC74E, AUTO, "OpcodeList3", & ???}, - {0, AC_WRITE, 0, 0, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC764, AUTO, "FrameRate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC772, AUTO, "TStop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC789, AUTO, "ReelName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDEA, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4D, AUTO, "Converter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE51, AUTO, "Exposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE52, AUTO, "Shadows", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE53, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE54, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE55, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC764, AUTO, "FrameRate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC772, AUTO, "TStop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC789, AUTO, "ReelName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDEA, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4D, AUTO, "Converter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE51, AUTO, "Exposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE52, AUTO, "Shadows", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE53, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE54, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE55, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib gpsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib iopAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib ifdAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0017, AUTO, "PanaISO", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, - {0, AC_WRITE, 1, 0, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010F, AUTO, "Make", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "Model", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0112, AUTO, "Orientation", &orientationInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011A, AUTO, "XResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011B, AUTO, "YResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0131, AUTO, "Software", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0132, AUTO, "DateTime", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x013B, AUTO, "Artist", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0017, AUTO, "PanaISO", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010F, AUTO, "Make", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "Model", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0112, AUTO, "Orientation", &orientationInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011A, AUTO, "XResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011B, AUTO, "YResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0131, AUTO, "Software", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0132, AUTO, "DateTime", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x013B, AUTO, "Artist", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, {0, AC_WRITE, 0, ifdAttribs, 0x014A, AUTO, "SubIFD", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP - {0, AC_WRITE, 0, 0, 0x4746, AUTO, "Rating", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP + {0, AC_WRITE, 0, nullptr, 0x4746, AUTO, "Rating", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, {0, AC_WRITE, 0, kodakIfdAttribs, 0x8290, AUTO, "KodakIFD", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x8298, AUTO, "Copyright", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format + {0, AC_WRITE, 1, nullptr, 0x8298, AUTO, "Copyright", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format {0, AC_WRITE, 0, exifAttribs, 0x8769, AUTO, "Exif", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, {0, AC_WRITE, 0, gpsAttribs, 0x8825, AUTO, "GPSInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, {0, AC_WRITE, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData - {0, AC_WRITE, 0, 0, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_DONTWRITE, 0, nullptr, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData + {0, AC_WRITE, 0, nullptr, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index b481f4ebe..aba977d0d 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -35,11 +35,11 @@ static double one2one(double val) Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1, Gtk::Image *imgIcon2, double2double_fun slider2value_, double2double_fun value2slider_) { - label = NULL; - adjusterListener = NULL; + label = nullptr; + adjusterListener = nullptr; afterReset = false; blocked = false; - automatic = NULL; + automatic = nullptr; eventPending = false; slider2value = slider2value_ ? slider2value_ : one2one; @@ -58,7 +58,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep hbox->set_border_width(0); hbox->set_spacing(2); - editedCheckBox = NULL; + editedCheckBox = nullptr; if (!vlabel.empty()) { adjustmentName = vlabel; @@ -106,7 +106,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep if (!imgIcon1 || !imgIcon2) { pack_start (*slider, true, true); } else { - Gtk::HBox *hbox2 = NULL; + Gtk::HBox *hbox2 = nullptr; // A second HBox is necessary hbox2 = Gtk::manage (new Gtk::HBox()); @@ -146,7 +146,7 @@ Adjuster::~Adjuster () sliderChange.block (true); spinChange.block (true); delayConnection.block (true); - adjusterListener = NULL; + adjusterListener = nullptr; if (automatic) { delete automatic; @@ -172,7 +172,7 @@ void Adjuster::delAutoButton () if (automatic) { removeIfThere(hbox, automatic); delete automatic; - automatic = NULL; + automatic = nullptr; } } @@ -228,7 +228,7 @@ void Adjuster::autoToggled () } } - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } } @@ -236,7 +236,7 @@ void Adjuster::autoToggled () void Adjuster::sliderReleased (GdkEventButton* event) { - if ((event != NULL) && (event->button == 1)) { + if ((event != nullptr) && (event->button == 1)) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -248,7 +248,7 @@ void Adjuster::sliderReleased (GdkEventButton* event) void Adjuster::spinReleased (GdkEventButton* event) { - if ((event != NULL) && delay == 0) { + if ((event != nullptr) && delay == 0) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -290,7 +290,7 @@ void Adjuster::resetValue (bool toInitial) void Adjuster::resetPressed (GdkEventButton* event) { - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { resetValue(true); } else { resetValue(false); @@ -464,7 +464,7 @@ void Adjuster::setAutoValue (bool a) bool Adjuster::notifyListener () { - if (eventPending && adjusterListener != NULL && !blocked) { + if (eventPending && adjusterListener != nullptr && !blocked) { adjusterListener->adjusterChanged (this, spin->get_value ()); } @@ -476,7 +476,7 @@ bool Adjuster::notifyListener () bool Adjuster::notifyListenerAutoToggled () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } diff --git a/rtgui/adjuster.h b/rtgui/adjuster.h index 4b9ad36a4..782139f05 100644 --- a/rtgui/adjuster.h +++ b/rtgui/adjuster.h @@ -79,7 +79,7 @@ public: int delay; - Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = NULL, Gtk::Image *imgIcon2 = NULL, double2double_fun slider2value = NULL, double2double_fun value2slider = NULL); + Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = nullptr, Gtk::Image *imgIcon2 = nullptr, double2double_fun slider2value = nullptr, double2double_fun value2slider = nullptr); virtual ~Adjuster (); // Add an "Automatic" checkbox next to the reset button. @@ -89,7 +89,7 @@ public: // Send back the value of og the Auto checkbox bool getAutoValue () { - return automatic != NULL ? automatic->get_active () : false; + return automatic != nullptr ? automatic->get_active () : false; } void setAutoValue (bool a); bool notifyListenerAutoToggled (); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 333ad8d4f..b4a2ad37f 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -38,7 +38,7 @@ using namespace std; using namespace rtengine; -BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(NULL), fileCatalog(aFileCatalog), sequence(0), listener(NULL) +BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCatalog(aFileCatalog), sequence(0), listener(nullptr) { location = THLOC_BATCHQUEUE; @@ -368,7 +368,7 @@ bool BatchQueue::loadBatchQueue () Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filename ) { timeval tv; - gettimeofday(&tv, 0); + gettimeofday(&tv, nullptr); char mseconds[4]; sprintf(mseconds, "%d", (int)(tv.tv_usec / 1000)); time_t rawtime; @@ -501,7 +501,7 @@ void BatchQueue::selectAll () { MYWRITERLOCK(l, entryRW); - lastClicked = NULL; + lastClicked = nullptr; selected.clear (); for (size_t i = 0; i < fd.size(); i++) { @@ -642,7 +642,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) MYWRITERLOCK(l, entryRW); delete processing; - processing = NULL; + processing = nullptr; fd.erase (fd.begin()); @@ -709,7 +709,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) redraw (); notifyListener (queueEmptied); - return processing ? processing->job : NULL; + return processing ? processing->job : nullptr; } // Calculates automatic filename of processed batch entry, but just the base name @@ -962,7 +962,7 @@ void BatchQueue::error (Glib::ustring msg) processing->addButtonSet (bqbs); processing->processing = false; processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params); - processing = NULL; + processing = nullptr; redraw (); } diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index b8bc45601..f8f9e4627 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -31,7 +31,7 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), - opreview(NULL), origpw(prevw), origph(prevh), opreviewDone(false), + opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false), job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) { @@ -64,7 +64,7 @@ BatchQueueEntry::~BatchQueueEntry () delete [] opreview; } - opreview = NULL; + opreview = nullptr; if (thumbnail) { thumbnail->decreaseRef (); @@ -84,7 +84,7 @@ void BatchQueueEntry::refreshThumbnailImage () // creating the image buffer first //if (!opreview) opreview = new guint8[(origpw+1) * origph * 3]; // this will asynchronously compute the original preview and land at this.updateImage - batchQueueEntryUpdater.process (NULL, origpw, origph, preh, this, ¶ms, thumbnail); + batchQueueEntryUpdater.process (nullptr, origpw, origph, preh, this, ¶ms, thumbnail); } else { // this will asynchronously land at this.updateImage batchQueueEntryUpdater.process (opreview, origpw, origph, preh, this); @@ -133,7 +133,7 @@ void BatchQueueEntry::removeButtonSet () { delete buttonSet; - buttonSet = NULL; + buttonSet = nullptr; } std::vector > BatchQueueEntry::getIconsOnImageArea () @@ -247,7 +247,7 @@ void BatchQueueEntry::_updateImage (guint8* img, int w, int h) MYWRITERLOCK(l, lockRW); prew = w; - assert (preview == NULL); + assert (preview == nullptr); preview = new guint8 [prew * preh * 3]; memcpy (preview, img, prew * preh * 3); diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h index 4ee3eb1a3..c2651a3ca 100644 --- a/rtgui/batchqueueentry.h +++ b/rtgui/batchqueueentry.h @@ -54,7 +54,7 @@ public: SaveFormat saveFormat; bool forceFormatOpts; - BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = NULL); + BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = nullptr); ~BatchQueueEntry (); void refreshThumbnailImage (); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index e1def62ec..15f0b88ad 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -103,7 +103,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) Gtk::Image* folderImg = Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)); folderImg->show (); outdirFolderButton->set_image (*folderImg); - outdirFolder = 0; + outdirFolder = nullptr; #else outdirFolder = Gtk::manage (new MyFileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); hb3->pack_start (*outdirFolder); @@ -180,7 +180,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) show_all (); if (batchQueue->loadBatchQueue ()) { - g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, NULL); + g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, nullptr); } } diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 004a2c812..2caa61187 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -47,8 +47,8 @@ BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolP } toolPanelNotebook->remove_page (*metadataPanel); - metadataPanel = 0; - toiM = 0; + metadataPanel = nullptr; + toiM = nullptr; for (size_t i = 0; i < toolPanels.size(); i++) { toolPanels[i]->setBatchMode (true); @@ -99,7 +99,7 @@ void BatchToolPanelCoordinator::closeSession (bool save) toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, true); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, true); } } @@ -848,7 +848,7 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { @@ -950,7 +950,7 @@ void BatchToolPanelCoordinator::profileChange (const rtengine::procparams::Part for (size_t i = 0; i < selected.size(); i++) { newParams = initialPP[i]; pparamsEdited.combine (newParams, pparams, selected.size() == 1); - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index 0c12aa311..c96a1a329 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -57,7 +57,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); // wbprovider interface void getAutoWB (double& temp, double& green, double equal); @@ -71,10 +71,10 @@ public: void endBatchPParamsChange(); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr); void optionsChanged (); }; diff --git a/rtgui/bayerpreprocess.h b/rtgui/bayerpreprocess.h index 3b7dce4dc..15b2ef7e5 100644 --- a/rtgui/bayerpreprocess.h +++ b/rtgui/bayerpreprocess.h @@ -36,10 +36,10 @@ public: BayerPreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void hotDeadPixelChanged(); diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h index 35b1cf084..b78002ea3 100644 --- a/rtgui/bayerprocess.h +++ b/rtgui/bayerprocess.h @@ -48,10 +48,10 @@ public: BayerProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/bayerrawexposure.h b/rtgui/bayerrawexposure.h index 94987ba1f..733aafc25 100644 --- a/rtgui/bayerrawexposure.h +++ b/rtgui/bayerrawexposure.h @@ -42,10 +42,10 @@ public: BayerRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void GreenChanged() ; void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index 69891b237..832c4c8ef 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -1196,7 +1196,7 @@ void BlackWhite::setBatchMode (bool batchMode) removeIfThere (mixerVBox, RGBLabels, false); delete RGBLabels; - RGBLabels = NULL; + RGBLabels = nullptr; ToolPanel::setBatchMode (batchMode); mixerRed->showEditedCB (); diff --git a/rtgui/blackwhite.h b/rtgui/blackwhite.h index d5e7c0a4f..e38258b04 100644 --- a/rtgui/blackwhite.h +++ b/rtgui/blackwhite.h @@ -101,9 +101,9 @@ public: BlackWhite (); ~BlackWhite (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 596811c58..37ce4c0ef 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -23,7 +23,7 @@ BatchQueueEntryUpdater batchQueueEntryUpdater; BatchQueueEntryUpdater::BatchQueueEntryUpdater () - : tostop(false), stopped(true), thread(NULL), qMutex(NULL) + : tostop(false), stopped(true), thread(nullptr), qMutex(nullptr) { } @@ -106,7 +106,7 @@ void BatchQueueEntryUpdater::processThread () break; } - rtengine::IImage8* img = NULL; + rtengine::IImage8* img = nullptr; bool newBuffer = false; if (current.thumbnail && current.pparams) { @@ -143,12 +143,12 @@ void BatchQueueEntryUpdater::processThread () int neww = current.newh * current.ow / current.oh; guint8* img = new guint8 [current.newh * neww * 3]; thumbInterp (current.oimg, current.ow, current.oh, img, neww, current.newh); - current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : NULL); + current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : nullptr); } if(current.oimg) { delete[] current.oimg; - current.oimg = NULL; + current.oimg = nullptr; } } diff --git a/rtgui/bqentryupdater.h b/rtgui/bqentryupdater.h index 4052649cf..75040b109 100644 --- a/rtgui/bqentryupdater.h +++ b/rtgui/bqentryupdater.h @@ -53,7 +53,7 @@ protected: public: BatchQueueEntryUpdater (); - void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = NULL, Thumbnail* thumbnail = NULL); + void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = nullptr, Thumbnail* thumbnail = nullptr); void removeJobs (BQEntryUpdateListener* listener); void terminate (); diff --git a/rtgui/cacorrection.h b/rtgui/cacorrection.h index 736242232..fd34bc942 100644 --- a/rtgui/cacorrection.h +++ b/rtgui/cacorrection.h @@ -34,9 +34,9 @@ public: CACorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/chmixer.h b/rtgui/chmixer.h index 0bf65736a..bd85517de 100644 --- a/rtgui/chmixer.h +++ b/rtgui/chmixer.h @@ -36,9 +36,9 @@ public: ChMixer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index e7a5b7b2c..a1b94a615 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -41,7 +41,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pparams) { delete partProfile.pparams; - partProfile.pparams = NULL; + partProfile.pparams = nullptr; } } @@ -54,7 +54,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } } @@ -74,6 +74,6 @@ void Clipboard::setProcParams (const rtengine::procparams::ProcParams& pparams) // delete pedited if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } diff --git a/rtgui/coarsepanel.h b/rtgui/coarsepanel.h index abe31d518..7ac1bccc5 100644 --- a/rtgui/coarsepanel.h +++ b/rtgui/coarsepanel.h @@ -37,8 +37,8 @@ public: CoarsePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void initBatchBehavior (); void rotateLeft (); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 04fe2a3bb..1560e275e 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -95,9 +95,9 @@ public: ColorAppearance (); ~ColorAppearance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc index 64e60b136..c6a8ec730 100644 --- a/rtgui/coloredbar.cc +++ b/rtgui/coloredbar.cc @@ -201,5 +201,5 @@ void ColoredBar::clearBgGradient () bool ColoredBar::canGetColors() { - return colorProvider != NULL || bgGradient.size() > 0; + return colorProvider != nullptr || bgGradient.size() > 0; } diff --git a/rtgui/colorprovider.h b/rtgui/colorprovider.h index ce0c25247..ab6fb2865 100644 --- a/rtgui/colorprovider.h +++ b/rtgui/colorprovider.h @@ -45,7 +45,7 @@ public: double ccGreen; double ccBlue; - ColorCaller() : colorCallerId(-1), colorProvider(NULL), ccRed(0.), ccGreen(0.), ccBlue(0.) {} + ColorCaller() : colorCallerId(-1), colorProvider(nullptr), ccRed(0.), ccGreen(0.), ccBlue(0.) {} void setColorProvider (ColorProvider* p, int id) { colorProvider = p; diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index 99ad03e9f..e2122f79e 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR")); colorCurveEditorG->setCurveListener (this); - colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); colorShape->setCurveColorProvider(this, 1); std::vector milestones; @@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR opacityCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve); - opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestones); @@ -156,14 +156,14 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------- Sliders + balance ------------------------------ - hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., NULL, false)); + hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., nullptr, false)); hlColSat->setAdjusterListener (this); hlColSat->setBgColorProvider(this, 2); hlColSat->setUpdatePolicy(RTUP_DYNAMIC); pack_start( *hlColSat, Gtk::PACK_SHRINK, 0); - shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., NULL, false)); + shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., nullptr, false)); shadowsColSat->setAdjusterListener (this); shadowsColSat->setBgColorProvider(this, 3); shadowsColSat->setUpdatePolicy(RTUP_DYNAMIC); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index e55ff36e8..e34447301 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -78,10 +78,10 @@ protected: public: ColorToning (); ~ColorToning(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 469013800..a9c0d2f2d 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -125,7 +125,7 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) set_spacing(3); for (unsigned int i = 0; i < count; ++i) { - AxisAdjuster *currAdjuster = NULL; + AxisAdjuster *currAdjuster = nullptr; const Axis *currAxis = &(axis.at(i)); axisAdjusters.at(i) = new AxisAdjuster(this, currAxis, i); currAdjuster = axisAdjusters.at(i); diff --git a/rtgui/coordinateadjuster.h b/rtgui/coordinateadjuster.h index 8f00f8ae7..bcb5b6bf1 100644 --- a/rtgui/coordinateadjuster.h +++ b/rtgui/coordinateadjuster.h @@ -47,7 +47,7 @@ class CoordinateProvider protected: CoordinateAdjuster *coordinateAdjuster; public: - CoordinateProvider() : coordinateAdjuster(NULL) {} + CoordinateProvider() : coordinateAdjuster(nullptr) {} virtual ~CoordinateProvider() {} void setListener(CoordinateAdjuster *adjuster) { diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 609ab9e64..9e8522463 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -38,7 +38,7 @@ public: Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) { - clistener = NULL; + clistener = nullptr; maxw = 3000; maxh = 2000; diff --git a/rtgui/crop.h b/rtgui/crop.h index 2b29e46aa..61eff4bd7 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -73,8 +73,8 @@ public: Crop (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void ratioChanged (); diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index d3c73bfdb..961b83c7c 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -32,10 +32,10 @@ using namespace rtengine; CropHandler::CropHandler () : zoom(10), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), - cropimg(NULL), cropimgtrue(NULL), cropimg_width(0), cropimg_height(0), + cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0), cix(0), ciy(0), ciw(0), cih(0), cis(1), - initial(false), isLowUpdatePriority(false), ipc(NULL), crop(NULL), - displayHandler(NULL) + initial(false), isLowUpdatePriority(false), ipc(nullptr), crop(nullptr), + displayHandler(nullptr) { chi = new CropHandlerIdleHelper; @@ -56,7 +56,7 @@ CropHandler::~CropHandler () if (crop) { //crop->destroy (); delete crop; // will do the same than destroy, plus delete the object - crop = NULL; + crop = nullptr; } cimg.lock (); @@ -86,8 +86,8 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) return; } - EditDataProvider *editDataProvider = NULL; - CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : NULL; + EditDataProvider *editDataProvider = nullptr; + CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : nullptr; if (cropWin) { editDataProvider = cropWin->getImageArea(); @@ -95,7 +95,7 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) crop = ipc->createCrop (editDataProvider, isDetailWindow); ipc->setSizeListener (this); - crop->setListener (enabled ? this : NULL); + crop->setListener (enabled ? this : nullptr); initial = true; } @@ -306,9 +306,9 @@ int createpixbufs (void* data) if (!ch->enabled) { delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; ch->cimg.unlock (); return 0; } @@ -340,9 +340,9 @@ int createpixbufs (void* data) } delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; } ch->cimg.unlock (); @@ -380,13 +380,13 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp delete [] cropimg; } - cropimg = NULL; + cropimg = nullptr; if (cropimgtrue) { delete [] cropimgtrue; } - cropimgtrue = NULL; + cropimgtrue = nullptr; if (ax == cropX && ay == cropY && aw == cropW && ah == cropH && askip == (zoom >= 1000 ? 1 : zoom)) { cropimg_width = im->getWidth (); @@ -455,14 +455,14 @@ void CropHandler::setEnabled (bool e) if (!enabled) { if (crop) { - crop->setListener (NULL); + crop->setListener (nullptr); } cimg.lock (); delete [] cropimg; - cropimg = NULL; + cropimg = nullptr; delete [] cropimgtrue; - cropimgtrue = NULL; + cropimgtrue = nullptr; cropPixbuf.clear (); cimg.unlock (); } else { diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index a4d7ded47..2bf446842 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -71,8 +71,8 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), - imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(NULL), - pmlistener(NULL), pmhlistener(NULL), observedCropWin(NULL) + imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr), + pmlistener(nullptr), pmhlistener(nullptr), observedCropWin(nullptr) { Glib::RefPtr context = parent->get_pango_context () ; Pango::FontDescription fontd = context->get_font_description (); @@ -86,11 +86,11 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet titleHeight = ih; - bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, NULL, LWButton::Left, LWButton::Center, "Zoom Out"); - bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, NULL, LWButton::Left, LWButton::Center, "Zoom In"); - bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, NULL, LWButton::Left, LWButton::Center, "Zoom 100/%"); + bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, nullptr, LWButton::Left, LWButton::Center, "Zoom Out"); + bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, nullptr, LWButton::Left, LWButton::Center, "Zoom In"); + bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, nullptr, LWButton::Left, LWButton::Center, "Zoom 100/%"); //bZoomFit = new LWButton (RTImage::createFromPng ("gtk-zoom-fit.png"), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit"); - bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, NULL, LWButton::Right, LWButton::Center, "Close"); + bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, nullptr, LWButton::Right, LWButton::Center, "Close"); buttonSet.add (bZoomOut); buttonSet.add (bZoomIn); @@ -730,7 +730,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } if (deleted) { - iarea->flawnOverWindow = NULL; + iarea->flawnOverWindow = nullptr; delete this; return; } @@ -752,7 +752,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } state = SNormal; - iarea->grabFocus (NULL); + iarea->grabFocus (nullptr); if (needRedraw) { iarea->redraw (); diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index c9d02d9a3..5428677c3 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -196,10 +196,10 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd bgHistValid = false; remoteDrag = false; selected = DCT_Linear; - bottomBarCP = NULL; - leftBarCP = NULL; - curveCP = NULL; - relatedWidget = NULL; + bottomBarCP = nullptr; + leftBarCP = nullptr; + curveCP = nullptr; + relatedWidget = nullptr; group = ceGroup; subGroup = ceSubGroup; diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 2638ac29e..71f94db4b 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -26,8 +26,8 @@ #include "multilangmgr.h" #include "rtimage.h" -CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(NULL), - displayedCurve(0), flatSubGroup(0), diagonalSubGroup(0), cl(NULL), numberOfPackedCurve(0) +CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(nullptr), + displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) { // We set the label to the one provided as parameter, even if it's an empty string @@ -101,11 +101,11 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe } default: - return (static_cast(NULL)); + return (static_cast(nullptr)); break; } - return NULL; // to avoid complains from Gcc + return nullptr; // to avoid complains from Gcc } /* @@ -134,13 +134,13 @@ void CurveEditorGroup::newLine() bool hasRelatedWidget = false; for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { + if (curveEditors[i]->relatedWidget != nullptr) { hasRelatedWidget = true; } } for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { + if (curveEditors[i]->relatedWidget != nullptr) { headerBox->pack_end (*curveEditors[i]->relatedWidget, Gtk::PACK_EXPAND_WIDGET, 2); } @@ -257,7 +257,7 @@ void CurveEditorGroup::curveTypeToggled(CurveEditor* ce) } } else { // The button is now released, so we have to hide this CurveEditor - displayedCurve = 0; + displayedCurve = nullptr; } ce->subGroup->switchGUI(); @@ -382,8 +382,8 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce) CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0) { - leftBar = NULL; - bottomBar = NULL; + leftBar = nullptr; + bottomBar = nullptr; } CurveEditorSubGroup::~CurveEditorSubGroup() diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index f4ca3e8ed..caf08b4a4 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -85,7 +85,7 @@ public: return displayedCurve; } //void on_realize (); - CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = NULL, bool periodic = true); + CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool periodic = true); protected: //void curveTypeToggled (); diff --git a/rtgui/darkframe.h b/rtgui/darkframe.h index fd0dc9fde..0660c953d 100644 --- a/rtgui/darkframe.h +++ b/rtgui/darkframe.h @@ -55,8 +55,8 @@ public: DarkFrame (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void darkFrameChanged (); void darkFrameReset (); diff --git a/rtgui/defringe.h b/rtgui/defringe.h index 1d076ed4b..ef0bfd2aa 100644 --- a/rtgui/defringe.h +++ b/rtgui/defringe.h @@ -42,9 +42,9 @@ public: Defringe (); ~Defringe (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void curveChanged (); diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index a806a710d..e3e83e153 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -35,7 +35,7 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Glib::ustring& curveDir) : CurveEditorSubGroup(curveDir) { - editedAdjuster = NULL; + editedAdjuster = nullptr; editedAdjusterValue = 0; curveBBoxPos = options.curvebboxpos; @@ -370,7 +370,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () bool prevState; prevState = editCustomConn.block(true); editCustom->set_active(false); - customCurve->pipetteMouseOver(NULL, NULL, 0); + customCurve->pipetteMouseOver(nullptr, nullptr, 0); customCurve->setDirty(true); if (!prevState) { @@ -379,7 +379,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editNURBSConn.block(true); editNURBS->set_active(false); - NURBSCurve->pipetteMouseOver(NULL, NULL, 0); + NURBSCurve->pipetteMouseOver(nullptr, nullptr, 0); NURBSCurve->setDirty(true); if (!prevState) { @@ -388,7 +388,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editParamConn.block(true); editParam->set_active(false); - paramCurve->pipetteMouseOver(NULL, NULL, 0); + paramCurve->pipetteMouseOver(nullptr, nullptr, 0); paramCurve->setDirty(true); if (!prevState) { @@ -410,7 +410,7 @@ void DiagonalCurveEditorSubGroup::pipetteMouseOver(EditDataProvider *provider, i paramCurve->pipetteMouseOver(curveEditor, provider, modifierKey); paramCurve->setDirty(true); float pipetteVal = 0.f; - editedAdjuster = NULL; + editedAdjuster = nullptr; int n = 0; if (provider->pipetteVal[0] != -1.f) { @@ -508,7 +508,7 @@ void DiagonalCurveEditorSubGroup::pipetteButton1Released(EditDataProvider *provi break; case (DCT_Parametric): - editedAdjuster = NULL; + editedAdjuster = nullptr; break; case (DCT_NURBS): @@ -576,7 +576,7 @@ void DiagonalCurveEditorSubGroup::stopNumericalAdjustment() */ void DiagonalCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch((DiagonalCurveType)(curveToRefresh->curveType->getSelected())) { case (DCT_Spline): customCurve->refresh(); @@ -618,11 +618,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -635,7 +635,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -643,11 +643,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -660,7 +660,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } @@ -700,7 +700,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() shcSelector->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); shcSelector->setBgGradient(bgGradient); shcSelector->setMargins( (leftBar ? MyCurve::getBarWidth() + CBAR_MARGIN : RADIUS), RADIUS ); - paramCurve->setColoredBar(leftBar, NULL); + paramCurve->setColoredBar(leftBar, nullptr); paramCurve->forceResize(); updateEditButton(dCurve, editParam, editParamConn); parent->pack_start (*paramCurveBox); @@ -1127,10 +1127,10 @@ bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) double mileStone[3]; dCurve->getRangeDefaultMilestones(mileStone[0], mileStone[1], mileStone[2]); - highlights->resetPressed(NULL); - lights->resetPressed(NULL); - darks->resetPressed(NULL); - shadows->resetPressed(NULL); + highlights->resetPressed(nullptr); + lights->resetPressed(nullptr); + darks->resetPressed(nullptr); + shadows->resetPressed(nullptr); shcSelector->setDefaults(mileStone[0], mileStone[1], mileStone[2]); shcSelector->reset(); paramCurve->reset (dce->paramResetCurve, dce->getIdentityValue()); diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 9eaf38587..8d220e452 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -436,7 +436,7 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) } count++; - dir = strtok(NULL, "/\\"); + dir = strtok(nullptr, "/\\"); } free(dcpy); diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 5bff14ef2..ee747269a 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -67,7 +67,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP //curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir); NoiscurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve); - lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", NULL, false)); + lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false)); lshape->setIdentityValue(0.); lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -157,7 +157,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP CCcurveEditorG = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE")); CCcurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve); - ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index 0a5a00e3f..e81bf263e 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -97,9 +97,9 @@ public: DirPyrDenoise (); ~DirPyrDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void curveChanged (CurveEditor* ce); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/dirpyrequalizer.h b/rtgui/dirpyrequalizer.h index d30e4d307..9a3517166 100644 --- a/rtgui/dirpyrequalizer.h +++ b/rtgui/dirpyrequalizer.h @@ -57,9 +57,9 @@ public: DirPyrEqualizer (); virtual ~DirPyrEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc index d63868e85..91ad00ae9 100644 --- a/rtgui/distortion.cc +++ b/rtgui/distortion.cc @@ -26,7 +26,7 @@ using namespace rtengine::procparams; Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTION_LABEL")) { - rlistener = NULL; + rlistener = nullptr; autoDistor = Gtk::manage (new Gtk::Button (M("TP_DISTORTION_AUTO"))); autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto.png"))); autoDistor->set_tooltip_text (M("TP_DISTORTION_AUTO_TIP")); diff --git a/rtgui/distortion.h b/rtgui/distortion.h index 304f9dcd7..c2856323d 100644 --- a/rtgui/distortion.h +++ b/rtgui/distortion.h @@ -37,9 +37,9 @@ public: Distortion (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/edit.cc b/rtgui/edit.cc index 95831db7a..58d856bb5 100644 --- a/rtgui/edit.cc +++ b/rtgui/edit.cc @@ -20,7 +20,7 @@ #include "edit.h" #include "rtimage.h" -ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(NULL), objectMode(OM_255), dataProvider(dataProvider) {} +ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(nullptr), objectMode(OM_255), dataProvider(dataProvider) {} ObjectMOBuffer::~ObjectMOBuffer() { @@ -69,7 +69,7 @@ EditSubscriber *ObjectMOBuffer::getEditSubscriber () { if (dataProvider) { return dataProvider->getCurrSubscriber(); } else { - return NULL; + return nullptr; } } @@ -1035,7 +1035,7 @@ void OPIcon::drawToMOChannel(Cairo::RefPtr &cr, unsigned short i } } -EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(NULL), action(ES_ACTION_NONE) {} +EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(nullptr), action(ES_ACTION_NONE) {} void EditSubscriber::setEditProvider(EditDataProvider *provider) { @@ -1107,7 +1107,7 @@ bool EditSubscriber::isPicking() //-------------------------------------------------------------------------------------------------- -EditDataProvider::EditDataProvider() : currSubscriber(NULL), object(0), posScreen(-1, -1), posImage(-1, -1), +EditDataProvider::EditDataProvider() : currSubscriber(nullptr), object(0), posScreen(-1, -1), posImage(-1, -1), deltaScreen(0, 0), deltaImage(0, 0), deltaPrevScreen(0, 0), deltaPrevImage(0, 0) { pipetteVal[0] = pipetteVal[1] = pipetteVal[2] = 0.f; @@ -1124,7 +1124,7 @@ void EditDataProvider::subscribe(EditSubscriber *subscriber) void EditDataProvider::unsubscribe() { - currSubscriber = NULL; + currSubscriber = nullptr; } void EditDataProvider::switchOffEditMode() diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 7c77e3f0a..f1d4d5661 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -210,7 +210,7 @@ public: }; EditorPanel::EditorPanel (FilePanel* filePanel) - : realized(false), iHistoryShow(NULL), iHistoryHide(NULL), iTopPanel_1_Show(NULL), iTopPanel_1_Hide(NULL), iRightPanel_1_Show(NULL), iRightPanel_1_Hide(NULL), iBeforeLockON(NULL), iBeforeLockOFF(NULL), beforePreviewHandler(NULL), beforeIarea(NULL), beforeBox(NULL), afterBox(NULL), afterHeaderBox(NULL), parent(NULL), openThm(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL) + : realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false), catalogPane(nullptr) { epih = new EditorPanelIdleHelper; @@ -231,7 +231,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) leftbox->set_border_width (2); leftbox->set_size_request(100, 250); - histogramPanel = NULL; + histogramPanel = nullptr; profilep = Gtk::manage (new ProfilePanel ()); ppframe = new Gtk::Frame (); @@ -286,7 +286,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) hidehp->set_image (*iHistoryShow); } - tbTopPanel_1 = NULL; + tbTopPanel_1 = nullptr; if (!simpleEditor && filePanel) { tbTopPanel_1 = new Gtk::ToggleButton (); @@ -411,7 +411,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->pack_end (*iareapanel->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1); iops->pack_end (*vsepz3, Gtk::PACK_SHRINK, 2); - navPrev = navNext = navSync = NULL; + navPrev = navNext = navSync = nullptr; if (!simpleEditor && !options.tabbedUI) { // Navigation buttons @@ -545,31 +545,31 @@ EditorPanel::EditorPanel (FilePanel* filePanel) EditorPanel::~EditorPanel () { - history->setHistoryBeforeLineListener (NULL); + history->setHistoryBeforeLineListener (nullptr); // the order is important! - iareapanel->setBeforeAfterViews (NULL, iareapanel); + iareapanel->setBeforeAfterViews (nullptr, iareapanel); delete iareapanel; - iareapanel = NULL; + iareapanel = nullptr; if (beforeIpc) { beforeIpc->stopProcessing (); } delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; close (); @@ -766,28 +766,28 @@ void EditorPanel::close () tpc->closeImage (); // this call stops image processing tpc->writeOptions (); rtengine::ImageSource* is = isrc->getImageSource(); - is->setProgressListener( NULL ); + is->setProgressListener( nullptr ); if (ipc) { - ipc->setPreviewImageListener (NULL); + ipc->setPreviewImageListener (nullptr); } if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete previewHandler; - previewHandler = NULL; + previewHandler = nullptr; if(iareapanel) { - iareapanel->imageArea->setPreviewHandler (NULL); - iareapanel->imageArea->setImProcCoordinator (NULL); + iareapanel->imageArea->setPreviewHandler (nullptr); + iareapanel->imageArea->setImProcCoordinator (nullptr); iareapanel->imageArea->unsubscribe(); } rtengine::StagedImageProcessor::destroy (ipc); - ipc = NULL; - navigator->previewWindow->setPreviewHandler (NULL); + ipc = nullptr; + navigator->previewWindow->setPreviewHandler (nullptr); // If the file was deleted somewhere, the openThm.descreaseRef delete the object, but we don't know here if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { @@ -809,7 +809,7 @@ void EditorPanel::saveProfile () ipc->getParams (¶ms); // Will call updateCache, which will update both the cached and sidecar files if necessary - openThm->setProcParams (params, NULL, EDITOR); + openThm->setProcParams (params, nullptr, EDITOR); } } @@ -933,7 +933,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (inProcessingP) { if (processingStartedTime == 0) { - processingStartedTime = ::time(NULL); + processingStartedTime = ::time(nullptr); } s->str = "PROGRESSBAR_PROCESSING"; @@ -943,12 +943,12 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (ipc && openThm && tpc->getChangedState()) { rtengine::procparams::ProcParams pparams; ipc->getParams (&pparams); - openThm->setProcParams (pparams, NULL, EDITOR, false); + openThm->setProcParams (pparams, nullptr, EDITOR, false); } // Ring a sound if it was a long event if (processingStartedTime != 0) { - time_t curTime = ::time(NULL); + time_t curTime = ::time(nullptr); if (::difftime(curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { SoundManager::playSoundAsync(options.sndLngEditProcDone); @@ -985,7 +985,7 @@ struct errparams { void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr) { - GtkWidget* msgd = gtk_message_dialog_new_with_markup (NULL, + GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -1786,29 +1786,29 @@ void EditorPanel::beforeAfterToggled () beforeIpc->stopProcessing (); } - iareapanel->setBeforeAfterViews (NULL, iareapanel); - iareapanel->imageArea->iLinkedImageArea = NULL; + iareapanel->setBeforeAfterViews (nullptr, iareapanel); + iareapanel->imageArea->iLinkedImageArea = nullptr; delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; } if (beforeAfter->get_active ()) { int errorCode = 0; - rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, NULL); + rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, nullptr); if( !beforeImg || errorCode ) { return; @@ -1971,7 +1971,7 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) } delete histogramPanel; - histogramPanel = NULL; + histogramPanel = nullptr; } // else no need to create it diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 09faca7d3..765739836 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -138,7 +138,7 @@ protected: public: - explicit EditorPanel (FilePanel* filePanel = NULL); + explicit EditorPanel (FilePanel* filePanel = nullptr); virtual ~EditorPanel (); void open (Thumbnail* tmb, rtengine::InitialImage* isrc); @@ -167,7 +167,7 @@ public: void refreshProcessingState (bool inProcessing); // this is called by setProcessingState in the gtk thread // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // thumbnaillistener interface void procParamsChanged (Thumbnail* thm, int whoChangedIt); diff --git a/rtgui/epd.h b/rtgui/epd.h index 6156d947c..c9fc5d0af 100644 --- a/rtgui/epd.h +++ b/rtgui/epd.h @@ -36,9 +36,9 @@ public: EdgePreservingDecompositionUI(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index c7e47ef57..66594b0e1 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; using namespace rtexif; -ExifPanel::ExifPanel () : idata(NULL) +ExifPanel::ExifPanel () : idata(nullptr) { recursiveOp = true; @@ -156,7 +156,7 @@ void ExifPanel::setImageData (const ImageMetaData* id) idata = id; exifTreeModel->clear (); - const std::vector defTags = ExifManager::getDefaultTIFFTags (NULL); + const std::vector defTags = ExifManager::getDefaultTIFFTags (nullptr); for (size_t i = 0; i < defTags.size(); i++) { Tag* defTag = defTags[i]; diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index 2269fed25..fd797ff56 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -89,9 +89,9 @@ public: ExifPanel (); virtual ~ExifPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 2e25ab6cf..394230855 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; -ExportPanel::ExportPanel () : listener (NULL) +ExportPanel::ExportPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index cf2b6ba9c..d0cf44151 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -226,7 +226,7 @@ bool ExtProgStore::spawnCommandSync (const Glib::ustring& cmd) try { - Glib::spawn_command_line_sync (cmd, NULL, NULL, &exitStatus); + Glib::spawn_command_line_sync (cmd, nullptr, nullptr, &exitStatus); } catch (const Glib::Exception& exception) { diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index e3066e4dc..9f8b36043 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -50,7 +50,7 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - return NULL; + return nullptr; } const Glib::ustring extension = basename.substr (pos + 1); @@ -62,12 +62,12 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) } } - return NULL; + return nullptr; } ThumbBrowserEntryBase* selectOriginalEntry (ThumbBrowserEntryBase* original, ThumbBrowserEntryBase* candidate) { - if (original == NULL) { + if (original == nullptr) { return candidate; } @@ -97,7 +97,7 @@ void findOriginalEntries (const std::vector& entries) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - (*entry)->setOriginal (NULL); + (*entry)->setOriginal (nullptr); continue; } @@ -109,7 +109,7 @@ void findOriginalEntries (const std::vector& entries) // Find the original image for each bucket for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) { const EntryVector& entries = bucket->second; - ThumbBrowserEntryBase* original = NULL; + ThumbBrowserEntryBase* original = nullptr; // Select the most likely original in a first pass... for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { @@ -118,7 +118,7 @@ void findOriginalEntries (const std::vector& entries) // ...and link all other images to it in a second pass. for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { - (*entry)->setOriginal (*entry != original ? original : NULL); + (*entry)->setOriginal (*entry != original ? original : nullptr); } } } @@ -126,7 +126,7 @@ void findOriginalEntries (const std::vector& entries) } FileBrowser::FileBrowser () - : tbl(NULL), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) + : tbl(nullptr), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) { fbih = new FileBrowserIdleHelper; @@ -225,12 +225,12 @@ FileBrowser::FileBrowser () #if defined(WIN32) Gtk::manage(miOpenDefaultViewer = new Gtk::MenuItem (M("FILEBROWSER_OPENDEFAULTVIEWER"))); #else - miOpenDefaultViewer = NULL; + miOpenDefaultViewer = nullptr; #endif // Build a list of menu items mMenuExtProgs.clear(); - amiExtProg = NULL; + amiExtProg = nullptr; for (const auto& action : extProgStore->getActions ()) { if (action.target == 1 || action.target == 2) { @@ -239,7 +239,7 @@ FileBrowser::FileBrowser () } // Attach them to menu - if (!mMenuExtProgs.empty() || miOpenDefaultViewer != NULL) { + if (!mMenuExtProgs.empty() || miOpenDefaultViewer != nullptr) { amiExtProg = new Gtk::MenuItem*[mMenuExtProgs.size()]; int itemNo = 0; @@ -248,7 +248,7 @@ FileBrowser::FileBrowser () p++; Gtk::Menu* submenuExtProg = Gtk::manage (new Gtk::Menu()); - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { submenuExtProg->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -261,7 +261,7 @@ FileBrowser::FileBrowser () submenuExtProg->show_all (); menuExtProg->set_submenu (*submenuExtProg); } else { - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { pmenu->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -417,7 +417,7 @@ FileBrowser::FileBrowser () amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i])); } - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { miOpenDefaultViewer->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), miOpenDefaultViewer)); } @@ -657,7 +657,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) } if (lastClicked == entry) { - lastClicked = NULL; + lastClicked = nullptr; } redraw (); @@ -665,7 +665,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) return (static_cast(entry)); } - return NULL; + return nullptr; } void FileBrowser::close () @@ -700,7 +700,7 @@ void FileBrowser::close () fd.clear (); } - lastClicked = NULL; + lastClicked = nullptr; } void FileBrowser::menuColorlabelActivated (Gtk::MenuItem* m) @@ -790,7 +790,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) else if (m == rename) { tbl->renameRequested (mselected); } else if (m == selall) { - lastClicked = NULL; + lastClicked = nullptr; { MYWRITERLOCK(l, entryRW); @@ -821,7 +821,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.df_autoselect = true; pp.raw.dark_frame.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -849,7 +849,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.dark_frame = fc.get_filename(); pp.raw.df_autoselect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -898,7 +898,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_AutoSelect = true; pp.raw.ff_file.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -925,7 +925,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_file = fc.get_filename(); pp.raw.ff_AutoSelect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -987,7 +987,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) // Empty run to update the thumb rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams (); - mselected[i]->thumbnail->setProcParams (params, NULL, FILEBROWSER); + mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER); } if (!mselected.empty() && bppcl) { @@ -1005,7 +1005,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) } //queue_draw (); - } else if (miOpenDefaultViewer != NULL && m == miOpenDefaultViewer) { + } else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) { openDefaultViewer(1); } } @@ -1088,7 +1088,7 @@ void FileBrowser::partPasteProfile () // copying read only clipboard PartialProfile to a temporary one, initialized to the thumb's ProcParams mselected[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file rtengine::procparams::PartialProfile cbPartProf = clipboard.getPartialProfile(); - rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), NULL); + rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), nullptr); // pushing the selected values of the clipboard PartialProfile to the temporary PartialProfile partialPasteDlg.applyPaste (pastedPartProf.pparams, pastedPartProf.pedited, cbPartProf.pparams, cbPartProf.pedited); @@ -1438,7 +1438,7 @@ void FileBrowser::applyFilter (const BrowserFilter& filter) selected.erase (j); if (lastClicked == fd[i]) { - lastClicked = NULL; + lastClicked = nullptr; } selchanged = true; @@ -1459,7 +1459,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry FileBrowserEntry* entry = static_cast(entryb); - if (filter.showOriginal && entry->getOriginal() != NULL) { + if (filter.showOriginal && entry->getOriginal() != nullptr) { return false; } diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index f2977b742..57deca4fd 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -36,7 +36,7 @@ Glib::RefPtr FileBrowserEntry::recentlySavedIcon; Glib::RefPtr FileBrowserEntry::enqueuedIcon; FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(NULL), cropgl(NULL), state(SNormal) + : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), cropgl(nullptr), state(SNormal) { thumbnail = thm; @@ -71,7 +71,7 @@ FileBrowserEntry::~FileBrowserEntry () feih->destroyed = true; } else { delete feih; - feih = 0; + feih = nullptr; } thumbImageUpdater->removeJobs (this); @@ -213,7 +213,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi { GThreadLock lock; - if ( feih == 0 || + if ( feih == nullptr || feih->destroyed ) { img->free(); return; @@ -231,7 +231,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi #if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) g_idle_add_full (G_PRIORITY_DEFAULT, updateImageUI, param, NULL); #else - g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, NULL); + g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, nullptr); #endif } @@ -252,10 +252,10 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: GThreadLock lock; // Check if image has been rotated since last time - rotated = preview != NULL && newLandscape != landscape; + rotated = preview != nullptr && newLandscape != landscape; guint8* temp = preview; - preview = NULL; + preview = nullptr; delete [] temp; temp = new guint8 [prew * preh * 3]; memcpy (temp, img->getData(), prew * preh * 3); @@ -267,7 +267,7 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: img->free (); - if (parent != NULL) { + if (parent != nullptr) { if (rotated) { parent->thumbRearrangementNeeded(); } else if (redrawRequests == 0) { @@ -532,7 +532,7 @@ bool FileBrowserEntry::releaseNotify (int button, int type, int bstate, int x, i } } else if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) { cropgl->cropManipReady (); - cropgl = NULL; + cropgl = nullptr; iatlistener->cropSelectionReady (); if (iatlistener->getToolBar()) { diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 440ca9039..3d2e4f552 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -44,10 +44,10 @@ using namespace std; FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : filepanel(filepanel), selectedDirectoryId(1), - listener(NULL), - fslistener(NULL), + listener(nullptr), + fslistener(nullptr), hasValidCurrentEFS(false), - filterPanel(NULL), + filterPanel(nullptr), previewsToLoad(0), previewsLoaded(0), coarsePanel(cp), @@ -667,8 +667,8 @@ void FileCatalog::_refreshProgressBar () GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent()); - Gtk::Box* hbb = NULL; - Gtk::Label *label = NULL; + Gtk::Box* hbb = nullptr; + Gtk::Label *label = nullptr; if( options.mainNBVertical ) { hbb = Gtk::manage (new Gtk::VBox ()); @@ -880,7 +880,7 @@ void FileCatalog::refreshHeight () void FileCatalog::_openImage (std::vector tmb) { - if (enabled && listener != NULL) { + if (enabled && listener != nullptr) { bool continueToLoad = true; for (size_t i = 0; i < tmb.size() && continueToLoad; i++) { diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index 429c8f430..a88a9d224 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -28,7 +28,7 @@ int FilePanelInitUI (void* data) return 0; } -FilePanel::FilePanel () : parent(NULL) +FilePanel::FilePanel () : parent(nullptr) { dirpaned = Gtk::manage ( new Gtk::HPaned () ); @@ -227,7 +227,7 @@ bool FilePanel::fileSelected (Thumbnail* thm) pendingLoadMutex.lock(); pendingLoad *pl = new pendingLoad(); pl->complete = false; - pl->pc = 0; + pl->pc = nullptr; pl->thm = thm; pendingLoads.push_back(pl); pendingLoadMutex.unlock(); diff --git a/rtgui/filmsimulation.h b/rtgui/filmsimulation.h index 440bf0c9e..9979f45b3 100644 --- a/rtgui/filmsimulation.h +++ b/rtgui/filmsimulation.h @@ -39,8 +39,8 @@ public: void adjusterChanged( Adjuster* a, double newval ); void setBatchMode( bool batchMode ); - void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL ); - void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL ); + void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr ); + void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr ); void setAdjusterBehavior( bool strength ); void trimValues( rtengine::procparams::ProcParams* pp ); diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index 5a118d6e1..483d292ea 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -23,7 +23,7 @@ using namespace rtengine; -FilterPanel::FilterPanel () : listener (NULL) +FilterPanel::FilterPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index fd975de5e..1177e7cfe 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -171,7 +171,7 @@ void FlatCurveEditorSubGroup::stopNumericalAdjustment() */ void FlatCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch(FlatCurveType(curveToRefresh->curveType->getSelected())) { case (FCT_MinMaxCPoints): CPointsCurve->refresh(); @@ -192,7 +192,7 @@ void FlatCurveEditorSubGroup::editModeSwitchedOff () // toggling off all edit buttons, even if only one is toggle on bool prevState = editCPointsConn.block(true); editCPoints->set_active(false); - CPointsCurve->pipetteMouseOver(NULL, NULL, 0); + CPointsCurve->pipetteMouseOver(nullptr, nullptr, 0); CPointsCurve->setDirty(true); if (!prevState) { @@ -288,11 +288,11 @@ void FlatCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -305,7 +305,7 @@ void FlatCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -313,11 +313,11 @@ void FlatCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -330,7 +330,7 @@ void FlatCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h index b85b154da..4c0a33a54 100644 --- a/rtgui/flatfield.h +++ b/rtgui/flatfield.h @@ -62,12 +62,12 @@ public: FlatField (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool clipctrladd); void trimValues (rtengine::procparams::ProcParams* pp); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/gradient.h b/rtgui/gradient.h index d1acb764b..2201ea7c4 100644 --- a/rtgui/gradient.h +++ b/rtgui/gradient.h @@ -37,9 +37,9 @@ public: Gradient (); ~Gradient (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index e52c83e65..241bd2963 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -473,9 +473,9 @@ void MyExpander::init() } MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -520,9 +520,9 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : } MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -1024,8 +1024,8 @@ void bindCurrentFolder (Gtk::FileChooser& chooser, Glib::ustring& variable) TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type) { - imgIcon = 0; - label = 0; + imgIcon = nullptr; + label = nullptr; filename = fname; labelText = labelTx; tooltipText = tooltipTx; @@ -1051,7 +1051,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!imgIcon) { removeIfThere(this, label, false); delete label; - label = 0; + label = nullptr; imgIcon = new RTImage (filename); pack_start(*imgIcon, Gtk::PACK_SHRINK, 0); set_tooltip_markup ("" + labelText + "\n" + tooltipText); @@ -1065,7 +1065,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!label) { removeIfThere(this, imgIcon, false); delete imgIcon; - imgIcon = 0; + imgIcon = nullptr; label = new Gtk::Label (labelText, Gtk::ALIGN_CENTER); pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); set_tooltip_markup (tooltipText); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 1b9c298ca..a33b34b30 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -409,10 +409,10 @@ public: void getSrcOffset(int &x, int &y); void getSrcOffset(rtengine::Coord &offset); - void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = NULL); - void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = NULL); + void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = nullptr); + void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = nullptr); void setDirty(bool isDirty) { diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 60cb1a444..79fe4a249 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -144,7 +144,7 @@ protected: public: - explicit HistogramArea(FullModeListener *fml = NULL); + explicit HistogramArea(FullModeListener *fml = nullptr); ~HistogramArea(); void renderHistogram (); diff --git a/rtgui/history.cc b/rtgui/history.cc index fa1ba372b..9c38a705b 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -25,7 +25,7 @@ using namespace rtengine::procparams; Glib::ustring eventDescrArray[NUMOFEVENTS]; -History::History (bool bookmarkSupport) : blistener(NULL), tpc (NULL), bmnum (1) +History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked diff --git a/rtgui/history.h b/rtgui/history.h index 23a7c30ae..e3d18354e 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -107,7 +107,7 @@ public: } // pparamschangelistener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); void clearParamChanges (); void historySelectionChanged (); diff --git a/rtgui/hsvequalizer.h b/rtgui/hsvequalizer.h index 939cd1904..d02cc378c 100644 --- a/rtgui/hsvequalizer.h +++ b/rtgui/hsvequalizer.h @@ -44,8 +44,8 @@ public: HSVEqualizer (); virtual ~HSVEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void curveChanged (CurveEditor* ce); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); void setBatchMode (bool batchMode); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index cc2cbc039..884bc3e40 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -29,7 +29,7 @@ using namespace rtengine::procparams; extern Options options; -ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(NULL), icmplistener(NULL), lastRefFilename(""), camName("") +ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr), lastRefFilename(""), camName("") { isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastBlendCMSMatrix = lastgamfree = false; @@ -358,7 +358,7 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) dcpIll->set_sensitive (false); dcpFrame->set_sensitive(false); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if(dcp_name == "(cameraICC)") { dcp = DCPStore::getInstance()->getStdProfile(camName); @@ -626,7 +626,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.freegamma = freegamma->get_active(); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if (ifromfile->get_active() && pp->icm.input.substr(0, 5) == "file:" && DCPStore::getInstance()->isValidDCPFileName(pp->icm.input.substr(5))) { dcp = DCPStore::getInstance()->getProfile(pp->icm.input.substr(5)); @@ -917,7 +917,7 @@ void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta) iembedded->set_active (!raw); icamera->set_sensitive (raw); camName = pMeta->getCamera(); - icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != NULL || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != NULL)); + icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr)); iembedded->set_sensitive (!raw); enableListener (); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 640cca5a2..538e3f79c 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -98,10 +98,10 @@ private: public: ICMPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool gammaadd, bool slopeadd); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 125968b8e..fc81bfa0d 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -29,16 +29,16 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) { infotext = ""; - cropgl = NULL; - pmlistener = NULL; - pmhlistener = NULL; - focusGrabber = NULL; - flawnOverWindow = NULL; - mainCropWindow = NULL; - previewHandler = NULL; + cropgl = nullptr; + pmlistener = nullptr; + pmhlistener = nullptr; + focusGrabber = nullptr; + flawnOverWindow = nullptr; + mainCropWindow = nullptr; + previewHandler = nullptr; showClippedH = false; showClippedS = false; - listener = NULL; + listener = nullptr; zoomPanel = Gtk::manage (new ZoomPanel (this)); indClippedPanel = Gtk::manage (new IndicateClippedPanel (this)); @@ -49,8 +49,8 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) signal_size_allocate().connect( sigc::mem_fun(*this, &ImageArea::on_resized) ); dirty = false; - ipc = NULL; - iLinkedImageArea = NULL; + ipc = nullptr; + iLinkedImageArea = nullptr; } ImageArea::~ImageArea () @@ -114,7 +114,7 @@ rtengine::StagedImageProcessor* ImageArea::getImProcCoordinator() const void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) { if( !ipc_ ) { - focusGrabber = NULL; + focusGrabber = nullptr; for (auto cropWin : cropWins) { delete cropWin; @@ -123,7 +123,7 @@ void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) cropWins.clear(); mainCropWindow->deleteColorPickers (); - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->setObservedCropWin (nullptr); } ipc = ipc_; @@ -252,7 +252,7 @@ bool ImageArea::on_motion_notify_event (GdkEventMotion* event) cw->pointerMoved (event->state, event->x, event->y); } else if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } } @@ -306,7 +306,7 @@ bool ImageArea::on_leave_notify_event (GdkEventCrossing* event) { if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } if (focusGrabber) { @@ -355,9 +355,9 @@ void ImageArea::unsubscribe() EditDataProvider::unsubscribe(); // Ask the Crops to free-up edit mode buffers - mainCropWindow->setEditSubscriber(NULL); + mainCropWindow->setEditSubscriber(nullptr); for (auto cropWin : cropWins) { - cropWin->setEditSubscriber(NULL); + cropWin->setEditSubscriber(nullptr); } setToolHand(); @@ -394,7 +394,7 @@ void ImageArea::grabFocus (CropWindow* cw) void ImageArea::unGrabFocus () { - focusGrabber = NULL; + focusGrabber = nullptr; } void ImageArea::addCropWindow () @@ -505,7 +505,7 @@ void ImageArea::cropWindowSelected (CropWindow* cw) void ImageArea::cropWindowClosed (CropWindow* cw) { - focusGrabber = NULL; + focusGrabber = nullptr; std::list::iterator i = std::find (cropWins.begin(), cropWins.end(), cw); if (i != cropWins.end()) { @@ -515,7 +515,7 @@ void ImageArea::cropWindowClosed (CropWindow* cw) if (!cropWins.empty()) { mainCropWindow->setObservedCropWin (cropWins.front()); } else { - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->setObservedCropWin (nullptr); } queue_draw (); diff --git a/rtgui/imageareapanel.cc b/rtgui/imageareapanel.cc index 9a351d66a..7bcb3d112 100644 --- a/rtgui/imageareapanel.cc +++ b/rtgui/imageareapanel.cc @@ -18,7 +18,7 @@ */ #include "imageareapanel.h" -ImageAreaPanel::ImageAreaPanel () : before(NULL), after(NULL) +ImageAreaPanel::ImageAreaPanel () : before(nullptr), after(nullptr) { set_border_width (2); diff --git a/rtgui/imageareatoollistener.h b/rtgui/imageareatoollistener.h index edb93f030..b7d5cec94 100644 --- a/rtgui/imageareatoollistener.h +++ b/rtgui/imageareatoollistener.h @@ -28,20 +28,20 @@ class ImageAreaToolListener public: virtual ~ImageAreaToolListener() {} - virtual void spotWBselected (int x, int y, Thumbnail* thm = NULL) {} + virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {} virtual int getSpotWBRectSize () { return 8; } virtual void cropSelectionReady () {} - virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL) {} + virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) {} virtual ToolBar* getToolBar () { - return NULL; + return nullptr; } - virtual CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + virtual CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { - return NULL; + return nullptr; } }; diff --git a/rtgui/impulsedenoise.h b/rtgui/impulsedenoise.h index 8052309c3..cd8de582b 100644 --- a/rtgui/impulsedenoise.h +++ b/rtgui/impulsedenoise.h @@ -34,9 +34,9 @@ public: ImpulseDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index e1f04b279..2a3330b5c 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -76,7 +76,7 @@ void IndicateClippedPanel::buttonToggled () // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 6c4891249..3909195b6 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -59,7 +59,7 @@ InspectorBuffer::~InspectorBuffer() { int InspectorBuffer::infoFromImage (const Glib::ustring& fname) { - rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, NULL); + rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, nullptr); if (!idata) { return 0; @@ -81,7 +81,7 @@ int InspectorBuffer::infoFromImage (const Glib::ustring& fname) return deg; } -Inspector::Inspector () : currImage(NULL), zoom(0.0), active(false) {} +Inspector::Inspector () : currImage(nullptr), zoom(0.0), active(false) {} Inspector::~Inspector() { @@ -207,7 +207,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) // deleting the last entries for (size_t i = images.size() - 1; i > size_t(options.maxInspectorBuffers - 1); --i) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } // resizing down @@ -215,14 +215,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) } if (fullPath.empty()) { - currImage = NULL; + currImage = nullptr; queue_draw(); return; } else { bool found = false; for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL && images.at(i)->imgPath == fullPath) { + if (images.at(i) != nullptr && images.at(i)->imgPath == fullPath) { currImage = images.at(i); // rolling the list 1 step to the beginning @@ -251,7 +251,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) images.push_back(iBuffer); currImage = images.at(images.size() - 1); } else { - currImage = NULL; + currImage = nullptr; } } } @@ -260,14 +260,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) void Inspector::deleteBuffers () { for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL) { + if (images.at(i) != nullptr) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } } images.resize(0); - currImage = NULL; + currImage = nullptr; } void Inspector::flushBuffers () diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index ce870d08d..7c26aa7ca 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -71,9 +71,9 @@ private: public: IPTCPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 7e5bf7b53..a173b47ec 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -623,8 +623,8 @@ void LCurve::setBatchMode (bool batchMode) chromaticity->showEditedCB (); rstprotection->showEditedCB (); curveEditorG->setBatchMode (batchMode); - lcshape->setBottomBarColorProvider(NULL, -1); - lcshape->setLeftBarColorProvider(NULL, -1); + lcshape->setBottomBarColorProvider(nullptr, -1); + lcshape->setLeftBarColorProvider(nullptr, -1); } diff --git a/rtgui/labcurve.h b/rtgui/labcurve.h index 6caba6b8a..403b49f9e 100644 --- a/rtgui/labcurve.h +++ b/rtgui/labcurve.h @@ -64,9 +64,9 @@ public: LCurve (); ~LCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 07f86542c..423a7a3ec 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(NULL) +LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr) { fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL"))); diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index 51a6e108c..b963489e1 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -44,8 +44,8 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void fillPressed (); diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index cb3a5cc6c..9543721a0 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -45,8 +45,8 @@ public: LensProfilePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setRawMeta (bool raw, const rtengine::ImageMetaData* pMeta); void onLCPFileChanged (); diff --git a/rtgui/lwbutton.cc b/rtgui/lwbutton.cc index f7914eedb..5a50c8307 100644 --- a/rtgui/lwbutton.cc +++ b/rtgui/lwbutton.cc @@ -20,7 +20,7 @@ #include "guiutils.h" LWButton::LWButton (Cairo::RefPtr i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring tooltip) - : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(NULL), actionCode(aCode), actionData(aData), toolTip(tooltip) + : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(nullptr), actionCode(aCode), actionData(aData), toolTip(tooltip) { if (i) { diff --git a/rtgui/main.cc b/rtgui/main.cc index 114204858..a3b4a60f2 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -280,7 +280,7 @@ int main(int argc, char **argv) #endif if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(NULL); // avoid annoying message boxes + TIFFSetWarningHandler(nullptr); // avoid annoying message boxes } #ifndef WIN32 @@ -392,7 +392,7 @@ void deleteProcParams(std::vector &pparam int processLineParams( int argc, char **argv ) { - rtengine::procparams::PartialProfile *rawParams = NULL, *imgParams = NULL; + rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; std::vector inputFiles; Glib::ustring outputPath = ""; std::vector processingParams; @@ -723,8 +723,8 @@ int processLineParams( int argc, char **argv ) Glib::ustring inputFile = inputFiles[iFile]; std::cout << "Processing: " << inputFile << std::endl; - rtengine::InitialImage* ii = NULL; - rtengine::ProcessingJob* job = NULL; + rtengine::InitialImage* ii = nullptr; + rtengine::ProcessingJob* job = nullptr; int errorCode; bool isRaw = false; @@ -766,7 +766,7 @@ int processLineParams( int argc, char **argv ) isRaw = false; } - ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, NULL ); + ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, nullptr ); if (!ii) { errors++; @@ -827,7 +827,7 @@ int processLineParams( int argc, char **argv ) } // Process image - rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, NULL, options.tunnelMetaData); + rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); if( !resultImage ) { errors++; diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index 626eef4f1..255818e7c 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,7 +21,7 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(NULL), cursor_type( CSArrow) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type( CSArrow) { graphX = get_allocation().get_width() - RADIUS * 2; @@ -30,9 +30,9 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal prevGraphH = graphH; buttonPressed = false; snapTo = ST_None; - leftBar = NULL; - bottomBar = NULL; - colorProvider = NULL; + leftBar = nullptr; + bottomBar = nullptr; + colorProvider = nullptr; sized = RS_Pending; snapToElmt = -100; curveIsDirty = true; @@ -152,11 +152,11 @@ void MyCurve::on_style_changed (const Glib::RefPtr& style) void MyCurve::refresh() { - if (leftBar != NULL) { + if (leftBar != nullptr) { leftBar->setDirty(true); } - if (bottomBar != NULL) { + if (bottomBar != nullptr) { bottomBar->setDirty(true); } diff --git a/rtgui/options.cc b/rtgui/options.cc index e76d0c06c..43159cec8 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2142,7 +2142,7 @@ int Options::saveToFile (Glib::ustring fname) FILE *f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { if (options.rtSettings.verbose) { printf("Options::saveToFile / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } @@ -2165,7 +2165,7 @@ bool Options::load () path = g_getenv("RT_SETTINGS"); - if (path != NULL) { + if (path != nullptr) { rtdir = Glib::ustring(path); if (!Glib::path_is_absolute(rtdir)) { @@ -2199,7 +2199,7 @@ bool Options::load () // Modify the path of the cache folder to the one provided in RT_CACHE environment variable path = g_getenv("RT_CACHE"); - if (path != NULL) { + if (path != nullptr) { cacheBaseDir = Glib::ustring(path); if (!Glib::path_is_absolute(cacheBaseDir)) { diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index a054b042e..d22f50fad 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -134,7 +134,7 @@ public: public: explicit PartialPasteDlg (const Glib::ustring &title); - void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); + void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = nullptr); void everythingToggled (); void basicToggled (); diff --git a/rtgui/pcvignette.h b/rtgui/pcvignette.h index 84e4b0f57..eab1cf67d 100644 --- a/rtgui/pcvignette.h +++ b/rtgui/pcvignette.h @@ -20,9 +20,9 @@ public: PCVignette (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index d6a1a97c9..434df2b3f 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -34,9 +34,9 @@ public: PerspCorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 24af17213..ee56c915b 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -26,8 +26,8 @@ PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label) : selected (-1) // -1 means that the button is invalid - , menu (0) - , buttonImage (0) + , menu (nullptr) + , buttonImage (nullptr) { button = thisButton; hasMenu = false; diff --git a/rtgui/pparamschangelistener.h b/rtgui/pparamschangelistener.h index 2fac8e8bd..ff55eea00 100644 --- a/rtgui/pparamschangelistener.h +++ b/rtgui/pparamschangelistener.h @@ -28,7 +28,7 @@ class PParamsChangeListener public: virtual ~PParamsChangeListener() {} - virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL) {} + virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr) {} virtual void clearParamChanges () {} }; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 23cb6f2bd..0858066fa 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -33,10 +33,10 @@ extern Options options; extern Glib::ustring argv0; -Preferences::Preferences (RTWindow *rtwindow) : rprofiles(NULL), iprofiles(NULL), parent(rtwindow) +Preferences::Preferences (RTWindow *rtwindow) : rprofiles(nullptr), iprofiles(nullptr), parent(rtwindow) { - splash = NULL; + splash = nullptr; set_title (M("MAIN_BUTTON_PREFERENCES")); @@ -1351,7 +1351,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } // process directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; try { dir = new Glib::Dir (dirname); @@ -2044,7 +2044,7 @@ void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface) #endif Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2098,7 +2098,7 @@ void Preferences::switchFontTo(Glib::ustring newFont) Gtk::RC::parse_string (Glib::ustring::compose( "style \"clearlooks-default\" { font_name = \"%1\" }", newFont)); Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2223,7 +2223,7 @@ void Preferences::updateFFinfos() bool Preferences::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/preprocess.h b/rtgui/preprocess.h index 8faf647a4..856a9a25e 100644 --- a/rtgui/preprocess.h +++ b/rtgui/preprocess.h @@ -40,8 +40,8 @@ public: PreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); //void setBatchMode (bool batchMode); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); diff --git a/rtgui/previewhandler.cc b/rtgui/previewhandler.cc index e6ef30bca..650e323eb 100644 --- a/rtgui/previewhandler.cc +++ b/rtgui/previewhandler.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -PreviewHandler::PreviewHandler () : image(NULL), previewScale(1.) +PreviewHandler::PreviewHandler () : image(nullptr), previewScale(1.) { pih = new PreviewHandlerIdleHelper; @@ -121,7 +121,7 @@ int delImageUI (void* data) if (pih->phandler->image) { IImage8* oldImg = pih->phandler->image; oldImg->getMutex().lock (); - pih->phandler->image = NULL; + pih->phandler->image = nullptr; oldImg->getMutex().unlock (); } diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index c38fed49d..82db6b9dc 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -42,7 +42,7 @@ public: Job(): dir_id_(0), - listener_(0) + listener_(nullptr) {} int dir_id_; @@ -122,7 +122,7 @@ public: // if something got // Issue 2406 FileBrowserEntry* fdn = 0; try { - Thumbnail* tmb = 0; + Thumbnail* tmb = nullptr; { if (Glib::file_test(j.dir_entry_, Glib::FILE_TEST_EXISTS)) { tmb = cacheMgr->getEntry(j.dir_entry_); @@ -176,7 +176,7 @@ PreviewLoader* PreviewLoader::getInstance(void) void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoaderListener* l) { // somebody listening? - if ( l != 0 ) { + if ( l != nullptr ) { { MyMutex::MyLock lock(impl_->mutex_); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 63989809d..e5e100ba5 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -220,7 +220,7 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } @@ -304,7 +304,7 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index 18c470e55..7d4eaaa0a 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -21,7 +21,7 @@ #include "imagearea.h" #include "cursormanager.h" -PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), imageArea(NULL), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) +PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) { rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) ); diff --git a/rtgui/profilechangelistener.h b/rtgui/profilechangelistener.h index 0f6870c2d..b3baa62d7 100644 --- a/rtgui/profilechangelistener.h +++ b/rtgui/profilechangelistener.h @@ -27,7 +27,7 @@ class ProfileChangeListener public: virtual ~ProfileChangeListener() {} - virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL) {} + virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr) {} virtual void setDefaults (rtengine::procparams::ProcParams* defparams) {} }; diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 5974b2242..f51a460b8 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -39,10 +39,10 @@ void ProfilePanel::cleanup () delete partialProfileDlg; } -ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename(""), imagePath("") +ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilename(""), imagePath("") { - tpc = NULL; + tpc = nullptr; profileFillModeOnImage = new RTImage("profile-filled.png"); profileFillModeOffImage = new RTImage("profile-partial.png"); @@ -109,8 +109,8 @@ ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename( paste->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::paste_clicked) ); - custom = NULL; - lastsaved = NULL; + custom = nullptr; + lastsaved = nullptr; dontupdate = false; profileStore.addListener(this); @@ -217,7 +217,7 @@ void ProfilePanel::storeCurrentValue () const ProfileStoreEntry *entry = profiles->getSelectedEntry(); const PartialProfile *currProfile; - if (entry && (currProfile = profileStore.getProfile(entry)) != NULL) { + if (entry && (currProfile = profileStore.getProfile(entry)) != nullptr) { // now storedPProfile has the current entry's values storedPProfile = new PartialProfile(currProfile->pparams, currProfile->pedited, true); } else { @@ -276,7 +276,7 @@ void ProfilePanel::restoreValue () if (storedPProfile) { storedPProfile->deleteInstance(); delete storedPProfile; - storedPProfile = NULL; + storedPProfile = nullptr; } } @@ -345,7 +345,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : NULL; + toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : nullptr; } if (toSave) { @@ -415,7 +415,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (entry) : NULL; + toSave = entry ? profileStore.getProfile (entry) : nullptr; } // toSave has to be a complete procparams @@ -529,7 +529,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited ) pe.combine(*custom->pparams, pp, true); @@ -544,7 +544,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) // we delete custom custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } } @@ -628,7 +628,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited ) pe.combine(*custom->pparams, pp, true); @@ -641,7 +641,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, NULL, &pp, NULL); + partialProfileDlg->applyPaste (custom->pparams, nullptr, &pp, nullptr); } else { // custom.pparams = clipboard.pparams non filtered *custom->pparams = pp; @@ -738,21 +738,21 @@ void ProfilePanel::procParamsChanged (rtengine::procparams::ProcParams* p, rteng void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams* lastSaved) { - const ProfileStoreEntry *pse = NULL; - const PartialProfile *defprofile = NULL; + const ProfileStoreEntry *pse = nullptr; + const PartialProfile *defprofile = nullptr; bool ccPrevState = changeconn.block(true); if (custom) { custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } if (lastsaved) { lastsaved->deleteInstance(); delete lastsaved; - lastsaved = NULL; + lastsaved = nullptr; } if (lastSaved) { diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index f80438aac..b0b1ac021 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -87,7 +87,7 @@ public: void setInitialFileName (const Glib::ustring& filename); // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // gui callbacks void save_clicked (GdkEventButton* event); diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc index 4f4f2c187..c80bbe388 100644 --- a/rtgui/profilestore.cc +++ b/rtgui/profilestore.cc @@ -26,7 +26,7 @@ ProfileStore profileStore; using namespace rtengine; using namespace rtengine::procparams; -ProfileStore::ProfileStore () : parseMutex(NULL), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(NULL), internalDefaultEntry(NULL) +ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr) { internalDefaultProfile = new AutoPartialProfile(); internalDefaultProfile->set(true); @@ -65,7 +65,7 @@ ProfileStore::~ProfileStore () delete internalDefaultProfile; lock.release(); delete parseMutex; - parseMutex = NULL; + parseMutex = nullptr; } /* @@ -142,7 +142,7 @@ void ProfileStore::_parseProfiles () // Check if the default profiles has been found. - if (findEntryFromFullPathU(options.defProfRaw) == NULL) { + if (findEntryFromFullPathU(options.defProfRaw) == nullptr) { options.setDefProfRawMissing(true); if (options.rtSettings.verbose) { @@ -150,7 +150,7 @@ void ProfileStore::_parseProfiles () } } - if (findEntryFromFullPathU(options.defProfImg) == NULL) { + if (findEntryFromFullPathU(options.defProfImg) == nullptr) { options.setDefProfImgMissing(true); if (options.rtSettings.verbose) { @@ -186,7 +186,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath } // walking through the directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; dir = new Glib::Dir (realPath); for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { @@ -271,7 +271,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path { if (path.empty()) { - return NULL; + return nullptr; } if (path == DEFPROFILE_INTERNAL) { @@ -298,7 +298,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path path = path.substr(0, path.length() - fName.length()); } else { // path is malformed, returning NULL; - return NULL; + return nullptr; } path = Glib::path_get_dirname(path); @@ -307,7 +307,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path int parentFolderId = findFolderId(path); if (parentFolderId == -1) { - return NULL; + return nullptr; } // 2. find the entry that match the given filename and parentFolderId @@ -317,7 +317,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path } } - return NULL; + return nullptr; } /** Protected version of findEntryFromFullPathU */ @@ -333,13 +333,13 @@ const PartialProfile* ProfileStore::getProfile (Glib::ustring path) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } const ProfileStoreEntry *pse = findEntryFromFullPath(path); if (!pse) { - return NULL; + return nullptr; } return getProfile(pse); @@ -351,7 +351,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } MyMutex::MyLock lock(*parseMutex); @@ -369,7 +369,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) #ifndef NDEBUG printf("WARNING! Profile not found!\n"); #endif - return NULL; + return nullptr; } } @@ -406,7 +406,7 @@ const ProcParams* ProfileStore::getDefaultProcParams (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -431,7 +431,7 @@ const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -538,7 +538,7 @@ const ProfileStoreEntry* ProfileStoreComboBox::getSelectedEntry() if (currRow) { return currRow[methodColumns.profileStoreEntry]; } else { - return NULL; + return nullptr; } } diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index 05a0a3797..ab45a0867 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -102,7 +102,7 @@ public: const ProfileStoreEntry *entry; #ifndef NDEBUG - ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(NULL) {} + ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(nullptr) {} #else ProfileStoreLabel() : Gtk::Label(""), entry(NULL) {} #endif diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index fe824a6a1..f62b645c3 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -85,12 +85,12 @@ class ProgressConnector { retval = opStart.emit (); g_idle_add (ProgressConnector::emitEndSignalUI, new sigc::signal0 (opEnd)); - workThread = 0; + workThread = nullptr; } public: - ProgressConnector (): retval( 0 ), workThread( 0 ) { } + ProgressConnector (): retval( 0 ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { diff --git a/rtgui/prsharpening.h b/rtgui/prsharpening.h index c0739b818..9bf90cc6c 100644 --- a/rtgui/prsharpening.h +++ b/rtgui/prsharpening.h @@ -58,9 +58,9 @@ public: PrSharpening (); virtual ~PrSharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/rawcacorrection.h b/rtgui/rawcacorrection.h index 82df2c3af..4edf9f9f2 100644 --- a/rtgui/rawcacorrection.h +++ b/rtgui/rawcacorrection.h @@ -39,10 +39,10 @@ public: RAWCACorr (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool caadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/rawexposure.h b/rtgui/rawexposure.h index 72e042892..d6e3e863f 100644 --- a/rtgui/rawexposure.h +++ b/rtgui/rawexposure.h @@ -37,10 +37,10 @@ public: RAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexposadd, bool pexpreseradd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index 16bfaff00..e51ada336 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" RenameDialog::RenameDialog (Gtk::Window* parent) - : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(NULL) + : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(nullptr) { Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2)); diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 231f84659..64cf673e9 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -29,7 +29,7 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals croph = 0; Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2)); - Gtk::Label *label = NULL; + Gtk::Label *label = nullptr; appliesTo = Gtk::manage (new MyComboBoxText ()); appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA")); diff --git a/rtgui/resize.h b/rtgui/resize.h index 19ddc5843..cf640c281 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -52,9 +52,9 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index d44cef912..dd5048320 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -105,7 +105,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), std::vector defaultCurve; rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); - transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); transmissionShape->setIdentityValue(0.); transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); transmissionShape->setBottomBarBgGradient(milestones); @@ -184,7 +184,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // std::vector defaultCurve; rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); - gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", NULL, false)); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false)); gaintransmissionShape->setIdentityValue(0.); gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); gaintransmissionShape->setBottomBarBgGradient(milestones); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index 064756a7b..65602863a 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -99,10 +99,10 @@ public: Retinex (); ~Retinex (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void autoOpenCurve (); diff --git a/rtgui/rgbcurves.h b/rtgui/rgbcurves.h index c471a2063..efca76422 100644 --- a/rtgui/rgbcurves.h +++ b/rtgui/rgbcurves.h @@ -44,8 +44,8 @@ public: RGBCurves (); ~RGBCurves (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setEditProvider (EditDataProvider *provider); void autoOpenCurve (); diff --git a/rtgui/rotate.cc b/rtgui/rotate.cc index e688dba62..d41362132 100644 --- a/rtgui/rotate.cc +++ b/rtgui/rotate.cc @@ -27,7 +27,7 @@ using namespace rtengine::procparams; Rotate::Rotate () : FoldableToolPanel(this, "rotate", M("TP_ROTATE_LABEL")) { - rlistener = NULL; + rlistener = nullptr; //TODO the action of the rotation slider is counter-intuitive Gtk::Image* irotateL = Gtk::manage (new RTImage ("rotate-right-2.png")); diff --git a/rtgui/rotate.h b/rtgui/rotate.h index a67f310d5..bad46ef84 100644 --- a/rtgui/rotate.h +++ b/rtgui/rotate.h @@ -36,9 +36,9 @@ public: Rotate (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void straighten (double deg); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index e64c64d8e..b9538ceca 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -79,12 +79,12 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(NULL) - , bpanel(NULL) - , splash(NULL) - , btn_fullscreen(NULL) - , epanel(NULL) - , fpanel(NULL) + : mainNB(nullptr) + , bpanel(nullptr) + , splash(nullptr) + , btn_fullscreen(nullptr) + , epanel(nullptr) + , fpanel(nullptr) { cacheMgr->init (); @@ -143,19 +143,19 @@ RTWindow::RTWindow () signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (NULL) ); + epanel = Gtk::manage( new EditorPanel (nullptr) ); epanel->setParent (this); add (*epanel); show_all (); - pldBridge = NULL; // No progress listener + pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); Thumbnail* thm = cm->getEntry( argv1 ); if(thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, NULL); + rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); epanel->open( thm, ii ); } } else { @@ -299,7 +299,7 @@ RTWindow::~RTWindow() delete pldBridge; } - pldBridge = NULL; + pldBridge = nullptr; #if defined(__APPLE__) g_object_unref (osxApp); #endif @@ -379,7 +379,7 @@ void RTWindow::on_realize () splash->show (); } else { delete splash; - splash = NULL; + splash = nullptr; } } } @@ -552,7 +552,7 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(0)) { + if (!on_delete_event(nullptr)) { gtk_main_quit(); } } @@ -844,7 +844,7 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) bool RTWindow::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/saveformatpanel.cc b/rtgui/saveformatpanel.cc index 2159f6623..2afd5703b 100644 --- a/rtgui/saveformatpanel.cc +++ b/rtgui/saveformatpanel.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "guiutils.h" -SaveFormatPanel::SaveFormatPanel () : listener (NULL) +SaveFormatPanel::SaveFormatPanel () : listener (nullptr) { jpegqual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100); @@ -96,7 +96,7 @@ void SaveFormatPanel::init (SaveFormat &sf) { FormatChangeListener* tmp = listener; - listener = NULL; + listener = nullptr; if (sf.format == "jpg") { format->set_active (0); diff --git a/rtgui/shadowshighlights.h b/rtgui/shadowshighlights.h index 60071e58f..167b1ecf1 100644 --- a/rtgui/shadowshighlights.h +++ b/rtgui/shadowshighlights.h @@ -41,9 +41,9 @@ public: ShadowsHighlights (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenedge.h b/rtgui/sharpenedge.h index 5c8730038..f27d4ecee 100644 --- a/rtgui/sharpenedge.h +++ b/rtgui/sharpenedge.h @@ -44,9 +44,9 @@ public: SharpenEdge (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool passadd); diff --git a/rtgui/sharpening.h b/rtgui/sharpening.h index 3020cea7f..45c2d9fe1 100644 --- a/rtgui/sharpening.h +++ b/rtgui/sharpening.h @@ -58,9 +58,9 @@ public: Sharpening (); virtual ~Sharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenmicro.h b/rtgui/sharpenmicro.h index 4b45dd5c4..03a75eaa5 100644 --- a/rtgui/sharpenmicro.h +++ b/rtgui/sharpenmicro.h @@ -44,9 +44,9 @@ public: SharpenMicro (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool uniformityadd ); diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 9cb41e1a5..1a5a7be4d 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "mycurve.h" -SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(NULL) +SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr) { positions[0] = defaults[0] = 0.25; diff --git a/rtgui/splash.cc b/rtgui/splash.cc index c936639f7..87408598e 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -87,7 +87,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t set_border_width (4); - releaseNotesSW = NULL; + releaseNotesSW = nullptr; nb = Gtk::manage (new Gtk::Notebook ()); get_vbox()->pack_start (*nb); @@ -110,7 +110,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(buildFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (buildFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -140,7 +140,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(creditsFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (creditsFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -171,7 +171,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(licenseFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (licenseFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -208,7 +208,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(releaseNotesFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (releaseNotesFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; diff --git a/rtgui/splash.h b/rtgui/splash.h index 9fe6d8220..707d0b86d 100644 --- a/rtgui/splash.h +++ b/rtgui/splash.h @@ -50,7 +50,7 @@ public: bool hasReleaseNotes() { - return releaseNotesSW != NULL; + return releaseNotesSW != nullptr; }; void showReleaseNotes(); bool on_timer (); diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index 800f6edf5..564507bd3 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -71,7 +71,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, double minValue, doub void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) { - adjusterListener = NULL; + adjusterListener = nullptr; afterReset = false; blocked = false; @@ -90,7 +90,7 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) editedChange = editedCheckBox->signal_toggled().connect( sigc::mem_fun(*this, &ThresholdAdjuster::editedToggled) ); hbox->pack_start (*editedCheckBox); } else { - editedCheckBox = NULL; + editedCheckBox = nullptr; } hbox->pack_start (*this->label); @@ -121,7 +121,7 @@ ThresholdAdjuster::~ThresholdAdjuster () selectorChange.disconnect(); delayConnection.block(true); - adjusterListener = NULL; + adjusterListener = nullptr; } void ThresholdAdjuster::setDefault (double bottom, double top) @@ -163,7 +163,7 @@ void ThresholdAdjuster::resetPressed (GdkEventButton* event) afterReset = true; - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) // CTRL pressed : resetting to current default value { tSelector.reset(); @@ -260,7 +260,7 @@ void ThresholdAdjuster::getValue (Glib::ustring& bottomLeft, Glib::ustring& topL bool ThresholdAdjuster::notifyListener () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { GThreadLock lock; sendToListener(); } diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 796f958e6..34d5bf14a 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -79,7 +79,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; @@ -123,7 +123,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 2d022f9f7..8a067ca49 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -25,7 +25,7 @@ using namespace std; ThumbBrowserBase::ThumbBrowserBase () - : lastClicked(NULL), previewHeight(options.thumbSize), numOfCols(1), inspector(NULL), isInspectorActive(false), location(THLOC_FILEBROWSER) + : lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), inspector(nullptr), isInspectorActive(false), location(THLOC_FILEBROWSER) { inW = -1; inH = -1; @@ -728,7 +728,7 @@ void ThumbBrowserBase::on_style_changed (const Glib::RefPtr& style) refreshThumbImages (); } -ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(NULL), dirty(true) +ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(nullptr), dirty(true) { } @@ -774,7 +774,7 @@ void ThumbBrowserBase::buttonPressed (int x, int y, int button, GdkEventType typ { // GUI already acquired - ThumbBrowserEntryBase* fileDescr = NULL; + ThumbBrowserEntryBase* fileDescr = nullptr; bool handled = false; { diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index 3783c5164..fea52f244 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -24,10 +24,10 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : fnlabw(0), fnlabh(0), dtlabw(0), dtlabh(0), exlabw(0), exlabh(0), prew(0), preh(0), prex(0), prey(0), upperMargin(6), borderWidth(1), textGap(6), sideMargin(8), lowerMargin(8), - preview(NULL), dispname(Glib::path_get_basename (fname)), buttonSet(NULL), width(0), height(0), + preview(nullptr), dispname(Glib::path_get_basename (fname)), buttonSet(nullptr), width(0), height(0), exp_width(0), exp_height(0), startx(0), starty(0), ofsX(0), ofsY(0), redrawRequests(0), - parent(NULL), original(NULL), bbSelected(false), bbFramed(false), bbPreview(NULL), - thumbnail(NULL), filename(fname), shortname(dispname), exifline(""), datetimeline(""), + parent(nullptr), original(nullptr), bbSelected(false), bbFramed(false), bbPreview(nullptr), + thumbnail(nullptr), filename(fname), shortname(dispname), exifline(""), datetimeline(""), selected(false), drawable(false), filtered(false), framed(false), processing(false), italicstyle(false), edited(false), recentlysaved(false), updatepriority(false), withFilename(WFNAME_NONE) {} @@ -387,7 +387,7 @@ void ThumbBrowserEntryBase::resize (int h) if ( preh != old_preh || width != old_width ) { delete [] preview; - preview = NULL; + preview = nullptr; refreshThumbnailImage (); } else { backBuffer.clear(); // This will force a backBuffer update on queue_draw diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 39711a5ae..0f903dcd8 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -47,10 +47,10 @@ public: {} Job(): - tbe_(0), - priority_(NULL), + tbe_(nullptr), + priority_(nullptr), upgrade_(false), - listener_(0) + listener_(nullptr) {} ThumbBrowserEntryBase* tbe_; @@ -156,7 +156,7 @@ public: // unlock and do processing; will relock on block exit, then call listener double scale = 1.0; - rtengine::IImage8* img = 0; + rtengine::IImage8* img = nullptr; Thumbnail* thm = j.tbe_->thumbnail; if ( j.upgrade_ ) { @@ -205,7 +205,7 @@ void ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade, ThumbImageUpdateListener* l) { // nobody listening? - if ( l == 0 ) { + if ( l == nullptr ) { return; } diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 62d48b2ec..71aeab0ab 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -34,8 +34,8 @@ using namespace rtengine::procparams; Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) - : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), - pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), + pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0), initial_(false) { @@ -58,12 +58,12 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa } delete tpp; - tpp = 0; + tpp = nullptr; } Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) - : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false), - pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false), + pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0.0), initial_(true) { @@ -76,7 +76,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::s initial_ = false; delete tpp; - tpp = 0; + tpp = nullptr; } void Thumbnail::_generateThumbnailImage () @@ -84,9 +84,9 @@ void Thumbnail::_generateThumbnailImage () // delete everything loaded into memory delete tpp; - tpp = NULL; + tpp = nullptr; delete [] lastImg; - lastImg = NULL; + lastImg = nullptr; tw = -1; th = options.maxThumbnailHeight; imgRatio = -1.; @@ -135,7 +135,7 @@ void Thumbnail::_generateThumbnailImage () tpp = rtengine::Thumbnail::loadQuickFromRaw (fname, ri, tw, th, 1, TRUE); } - if ( tpp == NULL ) { + if ( tpp == nullptr ) { quick = false; tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE); } @@ -210,7 +210,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu static int index = 0; // Will act as unique identifier during the session // try to load the last saved parameters from the cache or from the paramfile file - ProcParams* ldprof = NULL; + ProcParams* ldprof = nullptr; Glib::ustring defProf = getType() == FT_Raw ? options.defProfRaw : options.defProfImg; @@ -225,12 +225,12 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu rtengine::RawMetaDataLocation metaData = rtengine::Thumbnail::loadMetaDataFromRaw(fname); imageMetaData = rtengine::ImageMetaData::fromFile (fname, &metaData); } else { - imageMetaData = rtengine::ImageMetaData::fromFile (fname, NULL); + imageMetaData = rtengine::ImageMetaData::fromFile (fname, nullptr); } Glib::ustring tmpFileName( Glib::build_filename(options.cacheBaseDir, Glib::ustring::compose("CPB_temp_%1.txt", index++)) ); - const rtexif::TagDirectory* exifDir = NULL; + const rtexif::TagDirectory* exifDir = nullptr; if (imageMetaData && (exifDir = imageMetaData->getExifData())) { Glib::ustring outFName; @@ -565,15 +565,15 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); - if ( tpp == 0 ) { + if ( tpp == nullptr ) { _loadThumbnail(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } } - rtengine::IImage8* image = 0; + rtengine::IImage8* image = nullptr; if ( cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL ) { // RAW internal thumbnail, no profile yet: just do some rotation etc. @@ -586,7 +586,7 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -596,20 +596,20 @@ rtengine::IImage8* Thumbnail::upgradeThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); if ( cfs.thumbImgType != CacheImageData::QUICK_THUMBNAIL ) { - return 0; + return nullptr; } _generateThumbnailImage(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -782,12 +782,12 @@ void Thumbnail::_loadThumbnail(bool firstTrial) _loadThumbnail (false); } - if (tpp == NULL) { + if (tpp == nullptr) { return; } } else if (!succ) { delete tpp; - tpp = NULL; + tpp = nullptr; return; } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 97dd20b5a..a7b889d5f 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -71,7 +71,7 @@ class Thumbnail void _loadThumbnail (bool firstTrial = true); void _saveThumbnail (); void _generateThumbnailImage (); - int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = NULL); + int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = nullptr); void loadThumbnail (bool firstTrial = true); void generateExifDateTimeStrings (); @@ -89,7 +89,7 @@ public: // Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel) rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB, bool flaggingMode = false); - void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = NULL, int whoChangedIt = -1, bool updateCacheNow = true); + void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true); void clearProcParams (int whoClearedIt = -1); void loadProcParams (); @@ -112,7 +112,7 @@ public: // unsigned char* getThumbnailImage (int &w, int &h, int fixwh=1); // fixwh = 0: fix w and calculate h, =1: fix h and calculate w rtengine::IImage8* processThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); rtengine::IImage8* upgradeThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); - void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = NULL); + void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = nullptr); void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h); const Glib::ustring& getExifString (); diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index be94c073a..e2ba03602 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -77,9 +77,9 @@ public: ToneCurve (); ~ToneCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 86604863e..345f9f892 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "guiutils.h" -ToolBar::ToolBar () : showColPickers(true), listener (NULL) +ToolBar::ToolBar () : showColPickers(true), listener (nullptr) { editingMode = false; diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index fdee3fa79..0b94359d0 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -65,7 +65,7 @@ void ToolParamBlock::on_style_changed (const Glib::RefPtr& style) updateStyle(); } -FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(NULL), exp(NULL), lastEnabled(true) +FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(nullptr), exp(nullptr), lastEnabled(true) { if (!content) { return; diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index 69a8d18ac..d7d0dc662 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -75,17 +75,17 @@ protected: public: - ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(NULL), tmp(NULL), batchMode(false), multiImage(false), need100Percent(need11) {} + ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(nullptr), tmp(nullptr), batchMode(false), multiImage(false), need100Percent(need11) {} virtual ~ToolPanel() {} virtual void setParent (Gtk::Box* parent) {} virtual Gtk::Box* getParent () { - return NULL; + return nullptr; } virtual MyExpander* getExpander () { - return NULL; + return nullptr; } virtual void setExpanded (bool expanded) {} virtual bool getExpanded () @@ -101,13 +101,13 @@ public: listener = tpl; } virtual void setEditProvider (EditDataProvider *provider) {} - virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL) {} - virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL) {} + virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) {} + virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) {} virtual void trimValues (rtengine::procparams::ProcParams* pp) { return; } - virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL) {} + virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) {} virtual void autoOpenCurve () {} /** @brief Disable the event broadcasting mechanism @@ -116,12 +116,12 @@ public: */ bool disableListener () { - if (tmp == NULL) { + if (tmp == nullptr) { tmp = listener; } - bool prevState = listener != NULL; - listener = NULL; + bool prevState = listener != nullptr; + listener = nullptr; return prevState; } @@ -129,11 +129,11 @@ public: */ void enableListener () { - if (tmp != NULL) { + if (tmp != nullptr) { listener = tmp; } - tmp = NULL; + tmp = nullptr; } virtual void setBatchMode (bool batchMode) diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index a13073018..cb748feff 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -516,7 +516,7 @@ void ToolPanelCoordinator::closeImage () if (ipc) { ipc->stopProcessing (); - ipc = NULL; + ipc = nullptr; } } @@ -646,7 +646,7 @@ void ToolPanelCoordinator::autoCropRequested () rtengine::RawImage* ToolPanelCoordinator::getDF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -661,13 +661,13 @@ rtengine::RawImage* ToolPanelCoordinator::getDF() return rtengine::dfm.searchDarkFrame( maker, model, iso, shutter, timestamp); } - return NULL; + return nullptr; } rtengine::RawImage* ToolPanelCoordinator::getFF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -685,7 +685,7 @@ rtengine::RawImage* ToolPanelCoordinator::getFF() return rtengine::ffm.searchFlatField( maker, model, lens, focallength, aperture, timestamp); } - return NULL; + return nullptr; } Glib::ustring ToolPanelCoordinator::GetCurrentImageFilePath() @@ -764,7 +764,7 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o { for (auto toolPanel : toolPanels) { - if (toolPanel->getParent() != NULL) { + if (toolPanel->getParent() != nullptr) { ToolPanel* currentTP = toolPanel; if (currentTP->getParent() == parent) { diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 14774df48..cf379fcd2 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -230,7 +230,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); void setDefaults (rtengine::procparams::ProcParams* defparams); // DirSelectionListener interface @@ -287,15 +287,15 @@ public: void saveInputICCReference (Glib::ustring fname, bool apply_wb); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); ToolBar* getToolBar () { return toolBar; } int getSpotWBRectSize (); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { return crop; } diff --git a/rtgui/vibrance.h b/rtgui/vibrance.h index e8afbbad0..ceb010434 100644 --- a/rtgui/vibrance.h +++ b/rtgui/vibrance.h @@ -54,9 +54,9 @@ public: Vibrance (); ~Vibrance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool pastelsadd, bool saturatedadd); diff --git a/rtgui/vignetting.h b/rtgui/vignetting.h index 6909b5af7..029f16808 100644 --- a/rtgui/vignetting.h +++ b/rtgui/vignetting.h @@ -37,9 +37,9 @@ public: Vignetting (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index abab1d2d1..892d8b8a0 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -374,7 +374,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opaCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve); - opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShapeRG->setIdentityValue(0.); opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -387,7 +387,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve); - opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShapeBY->setIdentityValue(0.); opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -406,19 +406,19 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), linkedgConn = linkedg->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::linkedgToggled) ); noiseBox->pack_start(*linkedg); - level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level0noise->setAdjusterListener (this); level0noise->setUpdatePolicy(RTUP_DYNAMIC); - level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level1noise->setAdjusterListener (this); level1noise->setUpdatePolicy(RTUP_DYNAMIC); - level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level2noise->setAdjusterListener (this); level2noise->setUpdatePolicy(RTUP_DYNAMIC); - level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level3noise->setAdjusterListener (this); level3noise->setUpdatePolicy(RTUP_DYNAMIC); @@ -487,7 +487,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), CCWcurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve); - ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -814,7 +814,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorW->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve); - opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestonesW); @@ -833,7 +833,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorWL->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve); - opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", NULL, false)); + opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false)); opacityShapeWL->setIdentityValue(0.); opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP")); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index b0bc967ab..554298e08 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -242,13 +242,13 @@ public: void adjusterChanged2 (ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR); void autoOpenCurve (); void curveChanged (CurveEditor* ce); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setEditProvider (EditDataProvider *provider); void updateToolState (std::vector &tpOpen); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void writeOptions (std::vector &tpOpen); diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index 3c4b61fe3..75873b680 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -147,7 +147,7 @@ static double wbTemp2Slider(double temp) return sval; } -WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(NULL), wblistener(NULL) +WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(nullptr), wblistener(nullptr) { Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); @@ -833,7 +833,7 @@ WBEntry* WhiteBalance::findWBEntry (Glib::ustring label, enum WB_LabelType lblTy } } - return NULL; + return nullptr; } int WhiteBalance::_setActiveMethod(Glib::ustring &label, Gtk::TreeModel::Children &children) diff --git a/rtgui/whitebalance.h b/rtgui/whitebalance.h index 3ebd503bc..8a34f83da 100644 --- a/rtgui/whitebalance.h +++ b/rtgui/whitebalance.h @@ -94,9 +94,9 @@ public: static void init (); static void cleanup (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void optChanged (); diff --git a/rtgui/xtransprocess.h b/rtgui/xtransprocess.h index eebec2f85..44ed2e670 100644 --- a/rtgui/xtransprocess.h +++ b/rtgui/xtransprocess.h @@ -40,10 +40,10 @@ public: XTransProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/xtransrawexposure.h b/rtgui/xtransrawexposure.h index 1a92146d3..4ed046a07 100644 --- a/rtgui/xtransrawexposure.h +++ b/rtgui/xtransrawexposure.h @@ -38,10 +38,10 @@ public: XTransRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); void trimValues (rtengine::procparams::ProcParams* pp); From 19de9d1efa40a91cb5bf2cb27e14c34994480c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 18:24:14 +0200 Subject: [PATCH 2/7] Apply `modernize-redundant-void-arg` --- rtengine/EdgePreservingDecomposition.cc | 2 +- rtengine/camconst.cc | 8 ++++---- rtengine/curves.cc | 2 +- rtgui/previewloader.cc | 4 ++-- rtgui/thumbimageupdater.cc | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index c8ba8f9d8..21abe733c 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -554,7 +554,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max return true; } -void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization(void) +void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization() { delete IncompleteCholeskyFactorization; } diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index 3e7ad6202..91d4e6c8b 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -321,7 +321,7 @@ parse_error: } bool -CameraConst::has_dcrawMatrix(void) +CameraConst::has_dcrawMatrix() { return dcraw_matrix[0] != 0; } @@ -339,7 +339,7 @@ CameraConst::update_dcrawMatrix(const short *other) } const short * -CameraConst::get_dcrawMatrix(void) +CameraConst::get_dcrawMatrix() { if (!has_dcrawMatrix()) { return nullptr; @@ -349,7 +349,7 @@ CameraConst::get_dcrawMatrix(void) } bool -CameraConst::has_rawCrop(void) +CameraConst::has_rawCrop() { return raw_crop[0] != 0 || raw_crop[1] != 0 || raw_crop[2] != 0 || raw_crop[3] != 0; } @@ -698,7 +698,7 @@ void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSetting } CameraConstantsStore * -CameraConstantsStore::getInstance(void) +CameraConstantsStore::getInstance() { static CameraConstantsStore instance_; return &instance_; diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 9b68cc9ee..2cd56dbb9 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1775,7 +1775,7 @@ float PerceptualToneCurve::get_curve_val(float x, float range[2], float lut[], s } // calculate a single value that represents the contrast of the tone curve -float PerceptualToneCurve::calculateToneCurveContrastValue(void) const +float PerceptualToneCurve::calculateToneCurveContrastValue() const { // find linear y = k*x the best approximates the curve, which is the linear scaling/exposure component that does not contribute any contrast diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index 82db6b9dc..4bdffc512 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -167,7 +167,7 @@ PreviewLoader::PreviewLoader(): { } -PreviewLoader* PreviewLoader::getInstance(void) +PreviewLoader* PreviewLoader::getInstance() { static PreviewLoader instance_; return &instance_; @@ -191,7 +191,7 @@ void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoade } } -void PreviewLoader::removeAllJobs(void) +void PreviewLoader::removeAllJobs() { DEBUG("stop %d", impl_->nConcurrentThreads); MyMutex::MyLock lock(impl_->mutex_); diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 0f903dcd8..7b3218a3e 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -190,7 +190,7 @@ public: }; ThumbImageUpdater* -ThumbImageUpdater::getInstance(void) +ThumbImageUpdater::getInstance() { static ThumbImageUpdater instance_; return &instance_; @@ -272,7 +272,7 @@ ThumbImageUpdater::removeJobs(ThumbImageUpdateListener* listener) } void -ThumbImageUpdater::removeAllJobs(void) +ThumbImageUpdater::removeAllJobs() { DEBUG("stop"); From aeaff29ac0a70f1ce7ce29cdf8899c1be9c17bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 20:01:30 +0200 Subject: [PATCH 3/7] Apply `readability-simplify-boolean-expr` --- rtengine/color.cc | 2 +- rtengine/imagedata.cc | 2 +- rtengine/improcfun.cc | 24 ++++++++++++------------ rtengine/ipsharpen.cc | 8 ++++---- rtengine/ipwavelet.cc | 18 +++++++++--------- rtengine/procparams.cc | 6 +----- rtengine/rawimage.cc | 2 +- rtgui/crop.cc | 2 +- rtgui/editorpanel.cc | 14 +++----------- rtgui/exifpanel.cc | 2 +- rtgui/filebrowser.cc | 6 +++--- rtgui/filecatalog.cc | 12 ++---------- rtgui/histogrampanel.cc | 6 +++--- rtgui/history.cc | 6 +++--- rtgui/imagearea.cc | 2 +- rtgui/options.cc | 8 ++------ rtgui/previewmodepanel.cc | 6 +++--- rtgui/profilepanel.cc | 12 ++---------- 18 files changed, 53 insertions(+), 85 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index b0250ce9c..aa7232db6 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -2248,7 +2248,7 @@ void Color::AllMunsellLch(bool lumaMuns, float Lprov1, float Loldd, float HH, fl correctionHueLum = 0.0; - if(contin1 == true && contin2 == true) { + if(contin1 && contin2) { correctlum = correctlumprov2 - correctlumprov; } diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index c3e8c7780..d3400a8d0 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -570,7 +570,7 @@ std::string ImageMetaData::expcompToString (double expcomp, bool maskZeroexpcomp char buffer[256]; - if (maskZeroexpcomp == true) { + if (maskZeroexpcomp) { if (expcomp != 0.0) { sprintf (buffer, "%0.2f", expcomp); return buffer; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1f41dd6b4..423a6b341 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -280,7 +280,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85; // if user => source image has surround very dark c = 0.55; nc = 0.85; @@ -507,7 +507,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh int gamu = 0; bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - if(params->colorappearance.gamut == true) { + if(params->colorappearance.gamut) { gamu = 1; //enabled gamut control } @@ -1503,7 +1503,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85f; // if user => source image has surround very dark c = 0.55f; nc = 0.85f; @@ -1808,7 +1808,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - const int gamu = (params->colorappearance.gamut == true) ? 1 : 0; + const int gamu = (params->colorappearance.gamut) ? 1 : 0; xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; @@ -3817,7 +3817,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3878,7 +3878,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int preser = 0; //bool execbal = params->colorToning.method=="Splitbal"; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3935,14 +3935,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; } int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if (twocol == false) { + if (!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours @@ -4521,7 +4521,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer */ int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4570,7 +4570,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4636,7 +4636,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; @@ -4644,7 +4644,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if(twocol == false) { + if(!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index 279b77762..c1a2f479e 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -184,7 +184,7 @@ void ImProcFunctions::sharpening (LabImage* lab, float** b2, SharpeningParams &s #endif { - if (sharpenParam.edgesonly == false) { + if (!sharpenParam.edgesonly) { gaussianBlur (lab->L, b2, W, H, sharpenParam.radius / scale); } else { bilateral (lab->L, (float**)b3, b2, W, H, sharpenParam.edges_radius / scale, sharpenParam.edges_tolerance, multiThread); @@ -327,7 +327,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) { // JD: this algorithm maximize clarity of images; it does not play on accutance. It can remove (partialy) the effects of the AA filter) // I think we can use this algorithm alone in most cases, or first to clarify image and if you want a very little USM (unsharp mask sharpening) after... - if (params->sharpenEdge.enabled == false) { + if (!params->sharpenEdge.enabled) { return; } @@ -564,7 +564,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) //! \param luminance : Luminance channel of image void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) { - if (params->sharpenMicro.enabled == false) { + if (!params->sharpenMicro.enabled) { return; } @@ -949,7 +949,7 @@ void ImProcFunctions::sharpeningcam (CieImage* ncie, float** b2) #endif { - if (params->sharpening.edgesonly == false) { + if (!params->sharpening.edgesonly) { gaussianBlur (ncie->sh_p, b2, W, H, params->sharpening.radius / scale); } else { bilateral (ncie->sh_p, (float**)b3, b2, W, H, params->sharpening.edges_radius / scale, params->sharpening.edges_tolerance, multiThread); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 76dd15e59..1ca5b78ec 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -845,7 +845,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } // printf("LevwavL before: %d\n",levwavL); - if(cp.contrast == 0.f && cp.tonemap == false && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels + if(cp.contrast == 0.f && !cp.tonemap && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels while(levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level levwavL--; } @@ -2599,7 +2599,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float * koe; float maxkoe = 0.f; - if(lipschitz == false) { + if(!lipschitz) { koe = new float [H_L * W_L]; for (int i = 0; i < W_L * H_L; i++) { @@ -2732,7 +2732,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit //take into account local contrast float refin = value * exp (expkoef); - if(cp.link == true && cp.noiseena) { //combi + if(cp.link && cp.noiseena) { //combi { if(level == 0) { refin *= (1.f + cp.lev0s / 50.f); // we can change this sensibility! @@ -2775,7 +2775,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2783,7 +2783,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -2885,7 +2885,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2893,7 +2893,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -2975,13 +2975,13 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == false) { + if(!lipschitz) { delete [] koe; } } - if(cp.link == false && cp.noiseena) { //used both with denoise 1 2 3 + if(!cp.link && cp.noiseena) { //used both with denoise 1 2 3 float refine = 0.f; for (int i = 0; i < W_L * H_L; i++) { diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 903bda6c6..b0a7873e9 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -7549,11 +7549,7 @@ bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b } } - if (a.threshold != b.threshold) { - return false; - } - - return true; + return a.threshold == b.threshold; } /*bool operator==(const ExifPairs& a, const ExifPairs& b) { diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index f631d4894..a36f2e222 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -782,7 +782,7 @@ void RawImage::getRgbCam (float rgbcam[3][4]) bool RawImage::get_thumbSwap() const { - return ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) ? true : false; + return (order == 0x4949) == (ntohs(0x1234) == 0x1234); } } //namespace rtengine diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 9e8522463..ab8a7a8cc 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -1283,7 +1283,7 @@ double Crop::getRatio () double r = -1.0; - if (fixr->get_active() == false) { + if (!fixr->get_active()) { return r; } diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index f1d4d5661..fb3d51297 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1890,18 +1890,10 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { - if(tbTopPanel_1->get_active() == false && tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return !(!tbTopPanel_1->get_active() && !tbRightPanel_1->get_active() && !hidehp->get_active()); } - if(tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return !(!tbRightPanel_1->get_active() && !hidehp->get_active()); } void EditorPanel::toggleSidePanels() { @@ -1918,7 +1910,7 @@ void EditorPanel::toggleSidePanels() tbRightPanel_1->set_active (!bAllSidePanelsVisible); hidehp->set_active (!bAllSidePanelsVisible); - if (bAllSidePanelsVisible == false) { + if (!bAllSidePanelsVisible) { tbShowHideSidePanels->set_image (*iShowHideSidePanels); } else { tbShowHideSidePanels->set_image (*iShowHideSidePanels_exit); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 66594b0e1..88d0a062b 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -582,7 +582,7 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre Gtk::TreeModel::iterator iter; for (iter = root.begin(); iter != root.end(); ++iter) { - if (iter->get_value (exifColumns.edited) == true) { + if (iter->get_value (exifColumns.edited)) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); } else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete"; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 9f8b36043..b11361db2 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -1464,8 +1464,8 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry } // return false if basic filter settings are not satisfied - if ((filter.showRanked[entry->thumbnail->getRank()] == false ) || - (filter.showCLabeled[entry->thumbnail->getColorLabel()] == false ) || + if ((!filter.showRanked[entry->thumbnail->getRank()] ) || + (!filter.showCLabeled[entry->thumbnail->getColorLabel()] ) || ((entry->thumbnail->hasProcParams() && filter.showEdited[0]) && !filter.showEdited[1]) || ((!entry->thumbnail->hasProcParams() && filter.showEdited[1]) && !filter.showEdited[0]) || @@ -1515,7 +1515,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry } } - if (MatchEqual == true) { + if (MatchEqual) { if (iFilenameMatch == 0) { //none of the vFilterStrings found in FileName return false; } diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 3d2e4f552..82e3a0200 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -2122,11 +2122,7 @@ void FileCatalog::tbRightPanel_1_toggled () bool FileCatalog::CheckSidePanelsVisibility() { - if(tbLeftPanel_1->get_active() == false && tbRightPanel_1->get_active() == false) { - return false; - } else { - return true; - } + return !(!tbLeftPanel_1->get_active() && !tbRightPanel_1->get_active()); } void FileCatalog::toggleSidePanels() { @@ -2539,11 +2535,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) } } - if (fileBrowser->keyPressed(event)) { - return true; - } - - return false; + return fileBrowser->keyPressed(event); } void FileCatalog::showToolBar() diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 65bbadf52..25e083af3 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -215,7 +215,7 @@ void HistogramPanel::resized (Gtk::Allocation& req) histogramArea->renderHistogram (); histogramArea->queue_draw (); - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); // set histogramRGBArea invalid; histogramRGBArea->renderRGBMarks(-1, -1, -1); @@ -305,9 +305,9 @@ void HistogramPanel::setHistRGBInvalid () // "Freeze" is not a button, but a RMB-click, so this is not in the RGBV-Toggle method void HistogramPanel::toggleFreeze () { - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); - } else if (histogramRGBArea->getShow() == true) { + } else if (histogramRGBArea->getShow()) { histogramRGBArea->updateFreeze(true); } diff --git a/rtgui/history.cc b/rtgui/history.cc index 9c38a705b..4deb7b64a 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -165,7 +165,7 @@ void History::historySelectionChanged () tpc->profileChange (&pp, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited); } - if (blistener && blistenerLock == false) { + if (blistener && !blistenerLock) { Gtk::TreeModel::Path path = historyModel->get_path (iter); path.prev (); iter = historyModel->get_iter (path); @@ -251,9 +251,9 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring selection->select (newrow); } - if (blistener && row && blistenerLock == false) { + if (blistener && row && !blistenerLock) { blistener->historyBeforeLineChanged (row[historyColumns.params]); - } else if (blistener && size == 0 && blistenerLock == false) { + } else if (blistener && size == 0 && !blistenerLock) { blistener->historyBeforeLineChanged (newrow[historyColumns.params]); } } diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index fc81bfa0d..32df9f8f6 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -213,7 +213,7 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) mainCropWindow->expose (cr); } - if (options.showInfo == true && infotext != "") { + if (options.showInfo && infotext != "") { int fnw, fnh; ilayout->get_pixel_size (fnw, fnh); window->draw_pixbuf (get_style()->get_base_gc (Gtk::STATE_NORMAL), ipixbuf, 0, 0, 4, 4, fnw + 8, fnh + 8, Gdk::RGB_DITHER_NONE, 0, 0); diff --git a/rtgui/options.cc b/rtgui/options.cc index 43159cec8..a46ec9f90 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -74,11 +74,7 @@ inline bool Options::checkProfilePath(Glib::ustring &path) p = getGlobalProfilePath(); - if (!p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - return true; - } else { - return false; - } + return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); } bool Options::checkDirPath(Glib::ustring &path, Glib::ustring errString) @@ -2324,7 +2320,7 @@ bool Options::load () void Options::save () { - if (options.multiUser == false) { + if (!options.multiUser) { options.saveToFile (Glib::build_filename(argv0, "options")); } else { options.saveToFile (Glib::build_filename(rtdir, "options")); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index e5e100ba5..601103fa8 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -88,9 +88,9 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) previewL->set_active (false); previewFocusMask->set_active (false); - backColor0->set_active (options.bgcolor == 0 ? true : false); - backColor1->set_active (options.bgcolor == 1 ? true : false); - backColor2->set_active (options.bgcolor == 2 ? true : false); + backColor0->set_active (options.bgcolor == 0); + backColor1->set_active (options.bgcolor == 1); + backColor2->set_active (options.bgcolor == 2); vbbackColor = Gtk::manage (new Gtk::VBox ()); vbbackColor->set_border_width (0); diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index f51a460b8..ad1cfccc3 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -153,20 +153,12 @@ ProfilePanel::~ProfilePanel () bool ProfilePanel::isCustomSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"); } bool ProfilePanel::isLastSavedSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"); } Gtk::TreeIter ProfilePanel::getCustomRow() From f9f4fe90354d5c3dad516dc305000dfa01446654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 17:12:50 +0200 Subject: [PATCH 4/7] Revert `rtengine/dcraw.cc` --- rtengine/dcraw.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 8acfd6187..3593f2777 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=nullptr, (*ip)[4]; + short *rp=0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=nullptr; + ushort *pixel=0; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return nullptr; + return 0; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return nullptr; + return 0; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4155,7 +4155,7 @@ void CLASS remove_zeroes() */ void CLASS bad_pixels (const char *cfname) { - FILE *fp=nullptr; + FILE *fp=0; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; @@ -4430,7 +4430,7 @@ void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) void CLASS wavelet_denoise() { - float *fimg=nullptr, *temp, thold, mul[2], avg, diff; + float *fimg=0, *temp, thold, mul[2], avg, diff; int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=nullptr, *pix; + ushort *img=0, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -4748,7 +4748,7 @@ void CLASS xtrans_interpolate (int passes) if (verbose) fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - cielab (nullptr,nullptr); + cielab (0,0); ndir = 4 << (passes > 1); buffer = (char *) malloc (TS*TS*(ndir*11+6)); merror (buffer, "xtrans_interpolate()"); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = nullptr; + load_raw = thumb_load_raw = 0; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } goto dng_skip; } From 730c03785d4e3ae34fa0618e7578ed57ddb9d713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:16:05 +0200 Subject: [PATCH 5/7] Reapplied clang-tidy filters - modernize-use-nullptr - modernize-redundant-void-arg - readability-simplify-boolean-expr - misc-redundant-expression - readability-redundant-control-flow - readability-avoid-const-params-in-decls --- rtengine/EdgePreservingDecomposition.cc | 2 +- rtengine/array2D.h | 16 +++--- rtengine/cplx_wavelet_dec.h | 12 ++--- rtengine/cplx_wavelet_level.h | 6 +-- rtengine/dcraw.cc | 16 +++--- rtengine/dcraw.h | 10 ++-- rtengine/dfmanager.cc | 34 ++++++------- rtengine/ffmanager.cc | 28 +++++------ rtengine/iccstore.cc | 6 +-- rtengine/iimage.h | 6 +-- rtengine/imageio.cc | 60 +++++++++++----------- rtengine/improccoordinator.cc | 28 +++++------ rtengine/improcfun.h | 18 +++---- rtengine/iplab2rgb.cc | 4 +- rtengine/rawimage.cc | 36 +++++++------- rtengine/rawimagesource.cc | 66 ++++++++++++------------- rtengine/simpleprocess.cc | 32 ++++++------ rtengine/stdimagesource.cc | 14 +++--- rtgui/progressconnector.h | 2 +- 19 files changed, 198 insertions(+), 198 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index c80d5e092..7bc292c3f 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -552,7 +552,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max return true; } -void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization(void) +void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization() { delete IncompleteCholeskyFactorization; } diff --git a/rtengine/array2D.h b/rtengine/array2D.h index 2d38d2e15..2fe4ecad4 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -83,19 +83,19 @@ private: { if ((ptr) && ((h > y) || (4 * h < y))) { delete[] ptr; - ptr = NULL; + ptr = nullptr; } if ((data) && (((h * w) > (x * y)) || ((h * w) < ((x * y) / 4)))) { delete[] data; - data = NULL; + data = nullptr; } - if (ptr == NULL) { + if (ptr == nullptr) { ptr = new T*[h]; } - if (data == NULL) { + if (data == nullptr) { data = new T[h * w + offset]; } @@ -113,7 +113,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0), flags(0) + x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0), flags(0) { //printf("got empty array2D init\n"); } @@ -151,7 +151,7 @@ public: if (owner) { data = new T[h * w]; } else { - data = NULL; + data = nullptr; } x = w; @@ -192,12 +192,12 @@ public: { if ((owner) && (data)) { delete[] data; - data = NULL; + data = nullptr; } if (ptr) { delete [] ptr; - ptr = NULL; + ptr = nullptr; } } diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index 40639e7ea..45e829322 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -155,17 +155,17 @@ wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int E *buffer[2]; buffer[0] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[0] == NULL) { + if(buffer[0] == nullptr) { memoryAllocationFailed = true; return; } buffer[1] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[1] == NULL) { + if(buffer[1] == nullptr) { memoryAllocationFailed = true; delete[] buffer[0]; - buffer[0] = NULL; + buffer[0] = nullptr; return; } @@ -210,7 +210,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; return; } @@ -234,7 +234,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) } else { // allocate new block of memory tmpLo = new (std::nothrow) E[width * height]; - if(tmpLo == NULL) { + if(tmpLo == nullptr) { memoryAllocationFailed = true; return; } @@ -242,7 +242,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; if(!wavelet_decomp[0]->bigBlockOfMemoryUsed()) { diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index 5c13158b8..59c206f27 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -84,7 +84,7 @@ public: template wavelet_level(E * src, E * dst, int level, int subsamp, int w, int h, float *filterV, float *filterH, int len, int offset, int skipcrop, int numThreads) - : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(NULL), m_w(w), m_h(h), m_w2(w), m_h2(h) + : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(nullptr), m_w(w), m_h(h), m_w2(w), m_h2(h) { if (subsamp) { skip = 1; @@ -159,7 +159,7 @@ T ** wavelet_level::create(int n) { T * data = new (std::nothrow) T[3 * n]; - if(data == NULL) { + if(data == nullptr) { bigBlockOfMemory = false; } @@ -171,7 +171,7 @@ T ** wavelet_level::create(int n) } else { subbands[j] = new (std::nothrow) T[n]; - if(subbands[j] == NULL) { + if(subbands[j] == nullptr) { printf("Couldn't allocate memory in level %d of wavelet\n", lvl); memoryAllocationFailed = true; } diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 54fc09622..169be3c3e 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=0, (*ip)[4]; + short *rp=nullptr, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=0; + ushort *pixel=nullptr; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return 0; + return nullptr; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return 0; + return nullptr; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=0, *pix; + ushort *img=nullptr, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; + load_raw = thumb_load_raw = nullptr; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } goto dng_skip; } diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 9d15a5826..0a68b02cc 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -43,13 +43,13 @@ public: :exif_base(-1) ,ciff_base(-1) ,ciff_len(0) - ,ifp(NULL),ofp(NULL) + ,ifp(nullptr),ofp(nullptr) ,order(0x4949) - ,ifname(NULL) - ,meta_data(NULL) + ,ifname(nullptr) + ,meta_data(nullptr) ,shot_select(0),multi_out(0) - ,float_raw_image(NULL) - ,image(NULL) + ,float_raw_image(nullptr) + ,image(nullptr) ,bright(1.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e0dea012b..ab76ff854 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -46,7 +46,7 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } } @@ -140,7 +140,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -202,7 +202,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -334,11 +334,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -346,11 +346,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info && info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -361,14 +361,14 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } RawImage ri (filename); int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } dfList_t::iterator iter; @@ -408,7 +408,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch(Gio::Error&) {} - return 0; + return nullptr; } void DFManager::getStat( int &totFiles, int &totTemplates) @@ -435,7 +435,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t ) { if( dfList.empty() ) { - return 0; + return nullptr; } std::string key( dfInfo::key(mak, mod, isospeed, shut) ); @@ -469,7 +469,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -480,7 +480,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string if( df ) { return df->getRawImage(); } else { - return 0; + return nullptr; } } @@ -498,7 +498,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) return df->getRawImage(); } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { @@ -508,7 +508,7 @@ std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) } } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t ) { @@ -527,7 +527,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std return &df->getHotPixels(); } else { - return 0; + return nullptr; } } @@ -626,7 +626,7 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std } if(!found) { - return 0; + return nullptr; } else { return &(iter->second); } diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 29121a696..069bbf563 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -42,7 +42,7 @@ inline ffInfo& ffInfo::operator =(const ffInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } } @@ -133,7 +133,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -195,7 +195,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -293,11 +293,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file ) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -305,11 +305,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -321,7 +321,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } @@ -329,7 +329,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } ffList_t::iterator iter; @@ -369,7 +369,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch (Gio::Error&) {} - return 0; + return nullptr; } void FFManager::getStat( int &totFiles, int &totTemplates) @@ -396,7 +396,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const std::string &len, double focal, double apert, time_t t ) { if( ffList.empty() ) { - return 0; + return nullptr; } std::string key( ffInfo::key(mak, mod, len, focal, apert) ); @@ -430,7 +430,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -441,7 +441,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string if( ff ) { return ff->getRawImage(); } else { - return 0; + return nullptr; } } @@ -459,7 +459,7 @@ RawImage* FFManager::searchFlatField( const Glib::ustring filename ) return ff->getRawImage(); } - return 0; + return nullptr; } diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 7b52a7a53..3cb9b4a71 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -207,7 +207,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) } cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(iprof, 0, &bytesNeeded); + cmsSaveProfileToMem(iprof, nullptr, &bytesNeeded); if (bytesNeeded == 0) { return nullptr; @@ -522,7 +522,7 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam //lcmsMutex->lock (); Mutex acquired by the caller cmsWhitePointFromTemp(&xyD, (double)temp); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile cmsFreeToneCurve(GammaTRC[0]); //lcmsMutex->unlock (); @@ -859,7 +859,7 @@ ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { data = new char[bytesNeeded + 1]; diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 70f07d68f..7e88e407f 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -592,7 +592,7 @@ public: PlanarPtr g; PlanarPtr b; - PlanarRGBData() : rowstride(0), planestride(0), data (NULL) {} + PlanarRGBData() : rowstride(0), planestride(0), data (nullptr) {} PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (nullptr) { allocate(w, h); @@ -711,7 +711,7 @@ public: /** Copy the data to another PlanarRGBData */ void copyData(PlanarRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); @@ -1231,7 +1231,7 @@ public: ChunkyPtr g; ChunkyPtr b; - ChunkyRGBData() : data (NULL) {} + ChunkyRGBData() : data (nullptr) {} ChunkyRGBData(int w, int h) : data (nullptr) { allocate(w, h); diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 48d9d81b6..f869a0f3e 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,7 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = NULL; + FILE* f = nullptr; #ifdef WIN32 @@ -91,13 +91,13 @@ Glib::ustring ImageIO::errorMsg[6] = {"Success", "Cannot read file.", "Invalid h // For only copying the raw input data void ImageIO::setMetadata (const rtexif::TagDirectory* eroot) { - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (NULL); + rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (nullptr); // make IPTC and XMP pass through td->keepTag(0x83bb); // IPTC @@ -115,18 +115,18 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr exifChange.clear(); exifChange = exif; - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - exifRoot = ((rtexif::TagDirectory*)eroot)->clone (NULL); + exifRoot = ((rtexif::TagDirectory*)eroot)->clone (nullptr); } - if (iptc != NULL) { + if (iptc != nullptr) { iptc_data_free (iptc); - iptc = NULL; + iptc = nullptr; } // build iptc structures for libiptcdata @@ -184,7 +184,7 @@ void ImageIO::setOutputProfile (char* pdata, int plen) profileData = new char [plen]; memcpy (profileData, pdata, plen); } else { - profileData = NULL; + profileData = nullptr; } profileLength = plen; @@ -224,7 +224,7 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -303,7 +303,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -331,7 +331,7 @@ int ImageIO::loadPNG (Glib::ustring fname) png_read_info(png, info); - embProfile = NULL; + embProfile = nullptr; //retrieving image information png_uint_32 width, height; @@ -388,7 +388,7 @@ int ImageIO::loadPNG (Glib::ustring fname) for (unsigned int i = 0; i < height; i++) { - png_read_row (png, (png_byte*)row, NULL); + png_read_row (png, (png_byte*)row, nullptr); if (bit_depth == 16) { // convert scanline to host byte order unsigned short* srow = (unsigned short*)row; @@ -405,7 +405,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } } - png_read_end (png, 0); + png_read_end (png, nullptr); png_destroy_read_struct (&png, &info, &end_info); delete [] row; @@ -489,7 +489,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -568,7 +568,7 @@ int ImageIO::loadJPEG (Glib::ustring fname) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -623,7 +623,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -732,7 +732,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -814,7 +814,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) loadedProfileData = new char [loadedProfileLength]; memcpy (loadedProfileData, profdata, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } allocate (width, height); @@ -837,7 +837,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); } else { - setScanline (row, linebuffer, bitspersample, NULL, NULL); + setScanline (row, linebuffer, bitspersample, nullptr, nullptr); } if (pl && !(row % 100)) { @@ -908,7 +908,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) pl->setProgress (0.0); } - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -918,7 +918,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_infop info = png_create_info_struct(png); if (!info) { - png_destroy_write_struct (&png, 0); + png_destroy_write_struct (&png, nullptr); fclose (file); return IMIO_HEADERERROR; } @@ -1101,7 +1101,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (NULL, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1307,23 +1307,23 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) //TODO Even though we are saving EXIF IFD - MakerNote still comes out screwed. - if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != nullptr) { TIFFSetField (out, TIFFTAG_MODEL, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != nullptr) { TIFFSetField (out, TIFFTAG_MAKE, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != nullptr) { TIFFSetField (out, TIFFTAG_DATETIME, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != nullptr) { TIFFSetField (out, TIFFTAG_ARTIST, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != nullptr) { TIFFSetField (out, TIFFTAG_COPYRIGHT, tag->getValue()); } @@ -1420,7 +1420,7 @@ void png_flush(png_structp png_ptr) FILE *io_ptr; io_ptr = (FILE *)(png_get_io_ptr(png_ptr)); - if (io_ptr != NULL) { + if (io_ptr != nullptr) { fflush(io_ptr); } } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 2b65e17e4..b3f5afee8 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,8 +33,8 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(NULL), oprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), + : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), + ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), @@ -87,7 +87,7 @@ ImProcCoordinator::ImProcCoordinator () fw(0), fh(0), tr(0), fullw(1), fullh(1), pW(-1), pH(-1), - plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), + plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) {} @@ -536,7 +536,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { @@ -608,7 +608,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); - ipf.chromiLuminanceCurve (NULL, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); + ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { @@ -762,7 +762,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) delete ncie; } - ncie = NULL; + ncie = nullptr; if (CAMBrightCurveJ) { CAMBrightCurveJ.reset(); @@ -841,19 +841,19 @@ void ImProcCoordinator::freeAll () delete oprevi; } - oprevi = NULL; + oprevi = nullptr; delete orig_prev; - orig_prev = NULL; + orig_prev = nullptr; delete oprevl; - oprevl = NULL; + oprevl = nullptr; delete nprevl; - nprevl = NULL; + nprevl = nullptr; if (ncie) { delete ncie; } - ncie = NULL; + ncie = nullptr; if (imageListener) { imageListener->delImage (previmg); @@ -867,7 +867,7 @@ void ImProcCoordinator::freeAll () delete shmap; } - shmap = NULL; + shmap = nullptr; } @@ -1086,7 +1086,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock(mProcessing); - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); @@ -1266,7 +1266,7 @@ void ImProcCoordinator::startProcessing () if (!destroying) { if (!updaterRunning) { updaterThreadStart.lock (); - thread = NULL; + thread = nullptr; updaterRunning = true; updaterThreadStart.unlock (); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 7ea7bbecf..5af2093d9 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -196,7 +196,7 @@ public: double lumimul[3]; ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} + : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -261,7 +261,7 @@ public: void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = NULL); + float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); @@ -296,11 +296,11 @@ public: void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = NULL); + void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); + void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); @@ -317,7 +317,7 @@ public: const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = NULL, bool madCalculated = false); + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); @@ -344,14 +344,14 @@ public: void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=NULL); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = NULL); + double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 924f79e1f..4e23c6400 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -173,7 +173,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } else printf("lab2rgb / bpc=false\n"); lcmsMutex->lock (); - cmsHPROFILE LabIProf = cmsCreateLab4Profile(NULL); + cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (LabIProf, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, icm.outputIntent, flags); // NOCACHE is important for thread safety cmsCloseProfile(LabIProf); lcmsMutex->unlock (); @@ -284,7 +284,7 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int Image16* image = new Image16 (cw, ch); - cmsHPROFILE oprof = NULL; + cmsHPROFILE oprof = nullptr; if (ga) { lcmsMutex->lock (); iccStore->getGammaArray(icm, *ga); diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index cb1c2a9c9..382ebe0a7 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -20,11 +20,11 @@ namespace rtengine extern const Settings* settings; RawImage::RawImage( const Glib::ustring &name ) - : data(NULL) + : data(nullptr) , prefilters(0) , filename(name) - , profile_data(NULL) - , allocation(NULL) + , profile_data(nullptr) + , allocation(nullptr) , rotate_deg(0) { memset(maximum_c4, 0, sizeof(maximum_c4)); @@ -45,22 +45,22 @@ RawImage::~RawImage() if(allocation) { delete [] allocation; - allocation = NULL; + allocation = nullptr; } if(float_raw_image) { delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } if(data) { delete [] data; - data = NULL; + data = nullptr; } if(profile_data) { delete [] profile_data; - profile_data = NULL; + profile_data = nullptr; } } @@ -401,9 +401,9 @@ skip_block: int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); - image = NULL; + image = nullptr; verbose = settings->verbose; - oprof = NULL; + oprof = nullptr; ifp = gfopen (ifname); // Maps to either file map or direct fopen @@ -415,18 +415,18 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene thumb_length = 0; thumb_offset = 0; - thumb_load_raw = 0; + thumb_load_raw = nullptr; use_camera_wb = 0; highlight = 1; half_size = 0; - raw_image = 0; + raw_image = nullptr; //***************** Read ALL raw file info identify (); if (!is_raw) { fclose(ifp); - ifp = NULL; + ifp = nullptr; if (plistener) { plistener->setProgress(1.0 * progressRange); @@ -532,7 +532,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene crop_masked_pixels(); free (raw_image); - raw_image = NULL; + raw_image = nullptr; } else { if (cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; @@ -644,7 +644,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if ( closeFile ) { fclose(ifp); - ifp = NULL; + ifp = nullptr; } if (plistener) { @@ -657,7 +657,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene float** RawImage::compress_image() { if( !image ) { - return NULL; + return nullptr; } if (isBayer() || isXtrans()) { @@ -700,7 +700,7 @@ float** RawImage::compress_image() } delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } else if (filters != 0 && !isXtrans()) { #pragma omp parallel for @@ -734,7 +734,7 @@ float** RawImage::compress_image() } free(image); // we don't need this anymore - image = NULL; + image = nullptr; return data; } @@ -783,7 +783,7 @@ void RawImage::getRgbCam (float rgbcam[3][4]) bool RawImage::get_thumbSwap() const { - return ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) ? true : false; + return (order == 0x4949) == (ntohs(0x1234) == 0x1234); } } //namespace rtengine diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 12ac4330a..b2e3e5e56 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -424,10 +424,10 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() , W(0), H(0) - , plistener(NULL) + , plistener(nullptr) , border(4) - , ri(NULL) - , cache(NULL) + , ri(nullptr) + , cache(nullptr) , rawData(0, 0) , green(0, 0) , red(0, 0) @@ -463,8 +463,8 @@ RawImageSource::RawImageSource () , defGain(0.0) , threshold(0) { - camProfile = NULL; - embProfile = NULL; + camProfile = nullptr; + embProfile = nullptr; rgbSourceModified = false; } @@ -889,12 +889,12 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - DCPProfile *dcpProf = NULL; + DCPProfile *dcpProf = nullptr; cmsHPROFILE dummy; - findInputProfile(cmp.input, NULL, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); + findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); - if (dcpProf == NULL) { - return NULL; + if (dcpProf == nullptr) { + return nullptr; } dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); @@ -1645,7 +1645,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgress (1.0); } - plistener = NULL; // This must be reset, because only load() is called through progressConnector + plistener = nullptr; // This must be reset, because only load() is called through progressConnector t2.set(); if( settings->verbose ) { @@ -1664,7 +1664,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le t1.set(); Glib::ustring newDF = raw.dark_frame; - RawImage *rid = NULL; + RawImage *rid = nullptr; if (!raw.df_autoselect) { if( !raw.dark_frame.empty()) { @@ -1702,7 +1702,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } //FLATFIELD start - RawImage *rif = NULL; + RawImage *rif = nullptr; if (!raw.ff_AutoSelect) { if( !raw.ff_file.empty()) { @@ -1713,7 +1713,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - bool hasFlatField = (rif != NULL); + bool hasFlatField = (rif != nullptr); if( hasFlatField && settings->verbose) { printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); @@ -1739,7 +1739,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } // If darkframe selected, correct hotpixels found on darkframe - bp = 0; + bp = nullptr; if( raw.df_autoselect ) { bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS()); @@ -2320,7 +2320,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC dLcurve(32768); } - FlatCurve* chcurve = NULL;//curve c=f(H) + FlatCurve* chcurve = nullptr;//curve c=f(H) bool chutili = false; if (deh.enabled && deh.retinexMethod == "highli") { @@ -2329,7 +2329,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC if (!chcurve || chcurve->isIdentity()) { if (chcurve) { delete chcurve; - chcurve = NULL; + chcurve = nullptr; } } else { chutili = true; @@ -2638,7 +2638,7 @@ void RawImageSource::flushRawData() { if(cache) { delete [] cache; - cache = 0; + cache = nullptr; } if (rawData) { @@ -3705,9 +3705,9 @@ void RawImageSource::getProfilePreprocParams(cmsHPROFILE in, float& gammaFac, fl copyright[0] = 0; if (cmsGetProfileInfoASCII(in, cmsInfoCopyright, cmsNoLanguage, cmsNoCountry, copyright, 256) > 0) { - if (strstr(copyright, "Phase One") != NULL) { + if (strstr(copyright, "Phase One") != nullptr) { gammaFac = 0.55556; // 1.8 - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { gammaFac = 0.5; lineFac = -0.4; lineSum = 1.35; // determined in reverse by measuring NX an RT developed colorchecker PNGs @@ -3776,7 +3776,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (dcpProf != NULL) { + if (dcpProf != nullptr) { // DCP processing const DCPProfile::Triple pre_mul_row = { pre_mul[0], @@ -3793,7 +3793,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (in == NULL) { + if (in == nullptr) { // use default camprofile, supplied by dcraw // in this case we avoid using the slllllooooooowwww lcms @@ -3869,10 +3869,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam camera_icc_type = CAMERA_ICC_TYPE_GENERIC; // Note: order the identification with the most detailed matching first since the more general ones may also match the more detailed - if ((strstr(copyright, "Leaf") != NULL || - strstr(copyright, "Phase One A/S") != NULL || - strstr(copyright, "Kodak") != NULL || - strstr(copyright, "Creo") != NULL) && + if ((strstr(copyright, "Leaf") != nullptr || + strstr(copyright, "Phase One A/S") != nullptr || + strstr(copyright, "Kodak") != nullptr || + strstr(copyright, "Creo") != nullptr) && (strstr(description, "LF2 ") == description || strstr(description, "LF3 ") == description || strstr(description, "LeafLF2") == description || @@ -3881,9 +3881,9 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam strstr(description, "MamiyaLF2") == description || strstr(description, "MamiyaLF3") == description)) { camera_icc_type = CAMERA_ICC_TYPE_LEAF; - } else if (strstr(copyright, "Phase One A/S") != NULL) { + } else if (strstr(copyright, "Phase One A/S") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_PHASE_ONE; - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_NIKON; } } @@ -3902,7 +3902,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam transform_via_pcs_lab = true; separate_pcs_lab_highlights = true; // We transform to Lab because we can and that we avoid getting an unnecessary unmatched gamma conversion which we would need to revert. - hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, NULL, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, nullptr, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { @@ -3926,7 +3926,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); - if (hTransform == NULL) { + if (hTransform == nullptr) { // Fallback: create transform from camera profile. Should not happen normally. lcmsMutex->lock (); hTransform = cmsCreateTransform (camprofile, TYPE_RGB_FLT, prophoto, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); @@ -4136,8 +4136,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Determine RAW input and output profiles. Returns TRUE on success bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in) { - in = NULL; // cam will be taken on NULL - *dcpProf = NULL; + in = nullptr; // cam will be taken on NULL + *dcpProf = nullptr; if (inProfile == "(none)") { return false; @@ -4149,7 +4149,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed // DCPs have higher quality, so use them first *dcpProf = DCPStore::getInstance()->getStdProfile(camName); - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { @@ -4163,7 +4163,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getProfile(normalName); } - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getProfile (inProfile); } } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index e31103929..9e7d5f58f 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -54,7 +54,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (errorCode) { delete job; - return NULL; + return nullptr; } } @@ -165,7 +165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; - Imagefloat *calclum = NULL ; + Imagefloat *calclum = nullptr ; params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// @@ -754,7 +754,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } // update blurmap - SHMap* shmap = NULL; + SHMap* shmap = nullptr; if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); @@ -858,7 +858,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -881,13 +881,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Freeing baseImg because not used anymore delete baseImg; - baseImg = NULL; + baseImg = nullptr; if (shmap) { delete shmap; } - shmap = NULL; + shmap = nullptr; if (pl) { pl->setProgress (0.55); @@ -933,7 +933,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - ipf.chromiLuminanceCurve (NULL, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { ipf.EPDToneMap(labView, 5, 1); @@ -1071,7 +1071,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete cieView; - cieView = NULL; + cieView = nullptr; @@ -1147,8 +1147,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - Image16* readyImg = NULL; - cmsHPROFILE jprof = NULL; + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; bool customGamma = false; bool useLCMS = false; bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; @@ -1163,7 +1163,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p //or selected Free gamma useLCMS = false; - if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == NULL) { + if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) { useLCMS = true; } @@ -1179,7 +1179,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete labView; - labView = NULL; + labView = nullptr; @@ -1229,7 +1229,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if iccStore->getProfile send back an object, then iccStore->getContent will do too cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile - if (jprof == NULL) { + if (jprof == nullptr) { if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } @@ -1243,7 +1243,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } else { // No ICM - readyImg->setOutputProfile (NULL, 0); + readyImg->setOutputProfile (nullptr, 0); } } @@ -1286,13 +1286,13 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo if (errorCode) { bpl->error (M("MAIN_MSG_CANNOTLOAD")); - currentJob = NULL; + currentJob = nullptr; } else { try { currentJob = bpl->imageReady (img); } catch (Glib::Exception& ex) { bpl->error (ex.what()); - currentJob = NULL; + currentJob = nullptr; } } } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index 826c8a49b..6017a1ca6 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,11 +51,11 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL), full(false), max{}, rgbSourceModified(false) +StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr), full(false), max{}, rgbSourceModified(false) { - embProfile = NULL; - idata = NULL; + embProfile = nullptr; + idata = nullptr; } StdImageSource::~StdImageSource () @@ -163,7 +163,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) if (error) { delete img; - img = NULL; + img = nullptr; return error; } @@ -228,7 +228,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement { bool skipTransform = false; - cmsHPROFILE in = NULL; + cmsHPROFILE in = nullptr; cmsHPROFILE out = iccStore->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { @@ -245,9 +245,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (cmp.input != "(none)") { in = iccStore->getProfile (cmp.input); - if (in == NULL && embedded) { + if (in == nullptr && embedded) { in = embedded; - } else if (in == NULL) { + } else if (in == nullptr) { if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index f62b645c3..fce1f17f5 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -90,7 +90,7 @@ class ProgressConnector public: - ProgressConnector (): retval( 0 ), workThread( nullptr ) { } + ProgressConnector (): retval( nullptr ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { From ae98d4cb1f49476694ce3906e6f3898cf0d2b35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:18:25 +0200 Subject: [PATCH 6/7] Revert `rtengine/dcraw.cc` --- rtengine/dcraw.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 169be3c3e..54fc09622 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=nullptr, (*ip)[4]; + short *rp=0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=nullptr; + ushort *pixel=0; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return nullptr; + return 0; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return nullptr; + return 0; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=nullptr, *pix; + ushort *img=0, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = nullptr; + load_raw = thumb_load_raw = 0; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } goto dng_skip; } From fb8941cd887191b15069ab3e11657f2c99bb419b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:30:25 +0200 Subject: [PATCH 7/7] Manually simplify bool expressions and fix `rtgui/progressconnector.h` --- rtgui/editorpanel.cc | 5 +++-- rtgui/filecatalog.cc | 3 ++- rtgui/progressconnector.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8abbe6e27..8dba7e38e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1968,11 +1968,12 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { - return !(!tbTopPanel_1->get_active() && !tbRightPanel_1->get_active() && !hidehp->get_active()); + return tbTopPanel_1->get_active() || tbRightPanel_1->get_active() || hidehp->get_active(); } - return !(!tbRightPanel_1->get_active() && !hidehp->get_active()); + return tbRightPanel_1->get_active() || hidehp->get_active(); } + void EditorPanel::toggleSidePanels() { // Maximize preview panel: diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 0c58b3038..97407fb1e 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -2123,8 +2123,9 @@ void FileCatalog::tbRightPanel_1_toggled () bool FileCatalog::CheckSidePanelsVisibility() { - return !(!tbLeftPanel_1->get_active() && !tbRightPanel_1->get_active()); + return tbLeftPanel_1->get_active() || tbRightPanel_1->get_active(); } + void FileCatalog::toggleSidePanels() { // toggle left AND right panels diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index fce1f17f5..f62b645c3 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -90,7 +90,7 @@ class ProgressConnector public: - ProgressConnector (): retval( nullptr ), workThread( nullptr ) { } + ProgressConnector (): retval( 0 ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) {