Skip to content

Commit de82b9f

Browse files
committed
Fix warnings: conversion to double/float, unused variables, register keyword
1 parent 72bf271 commit de82b9f

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
538538
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
539539
pkg_check_modules(FFTW3F REQUIRED fftw3f)
540540

541+
# By default little-cms2 uses 'register' keyword which is deprecated and removed in c++17
542+
# This definition forces not to use it
543+
add_definitions("-DCMS_NO_REGISTER_KEYWORD")
544+
541545
#Set the appropriate FFTW flags on macOS
542546
if(APPLE AND OPTION_OMP)
543547
set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm")

rtengine/dfmanager.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ class rtengine::DFManager::Implementation final :
317317
typedef std::map<std::string, std::vector<badPix> > bpList_t;
318318
dfList_t dfList;
319319
bpList_t bpList;
320-
bool initialized;
321320
Glib::ustring currentPath;
322321
dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true);
323322
dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t);

rtengine/rawimagesource.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5307,8 +5307,8 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double
53075307
Glib::ustring profuse;
53085308
profuse = "JDCmax";
53095309

5310-
int limx = 0.05f;
5311-
int limy = 0.04f;
5310+
float limx = 0.05f;
5311+
float limy = 0.04f;
53125312

53135313
if (wbpar.itcwb_prim == "srgb") {
53145314
profuse = "sRGB";

rtgui/dirbrowser.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
393393

394394
char* dcpy = strdup (absDirPath.c_str());
395395
char* dir = strtok (dcpy, "/\\");
396+
#ifdef _WIN32
396397
int count = 0;
398+
#endif
397399
expandSuccess = true;
398400

399401
#ifndef _WIN32
@@ -436,8 +438,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
436438
++ix;
437439
++i;
438440
}
439-
441+
#ifdef _WIN32
440442
count++;
443+
#endif
441444
dir = strtok(nullptr, "/\\");
442445
}
443446

rtgui/editwindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "guiutils.h"
2525

2626
class EditorPanel;
27-
class ExternalEditor;
27+
struct ExternalEditor;
2828
class RTWindow;
2929

3030
class EditWindow :

rtgui/flatfield.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ void FlatField::setGainMap(bool enabled) {
445445
flatFieldFromMetaData->set_sensitive(enabled);
446446
if (!enabled) {
447447
idle_register.add(
448-
[this, enabled]() -> bool
448+
[this]() -> bool
449449
{
450450
disableListener();
451451
flatFieldFromMetaData->setValue(false);

rtgui/lockablecolorpicker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace rtengine
3030
namespace procparams
3131
{
3232

33-
class ColorManagementParams;
33+
struct ColorManagementParams;
3434

3535
}
3636

rtgui/pointermotionlistener.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace rtengine
2828
namespace procparams
2929
{
3030

31-
class ColorManagementParams;
31+
struct ColorManagementParams;
3232

3333
}
3434

0 commit comments

Comments
 (0)