Fix warnings: conversion to double/float, unused variables, register keyword

This commit is contained in:
Alexander Gruzintsev 2023-10-30 08:18:33 +01:00
parent 72bf271214
commit de82b9fc7a
8 changed files with 14 additions and 8 deletions

View File

@ -538,6 +538,10 @@ pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
pkg_check_modules(EXPAT REQUIRED expat>=2.1) pkg_check_modules(EXPAT REQUIRED expat>=2.1)
pkg_check_modules(FFTW3F REQUIRED fftw3f) pkg_check_modules(FFTW3F REQUIRED fftw3f)
# By default little-cms2 uses 'register' keyword which is deprecated and removed in c++17
# This definition forces not to use it
add_definitions("-DCMS_NO_REGISTER_KEYWORD")
#Set the appropriate FFTW flags on macOS #Set the appropriate FFTW flags on macOS
if(APPLE AND OPTION_OMP) if(APPLE AND OPTION_OMP)
set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm") set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm")

View File

@ -317,7 +317,6 @@ private:
typedef std::map<std::string, std::vector<badPix> > bpList_t; typedef std::map<std::string, std::vector<badPix> > bpList_t;
dfList_t dfList; dfList_t dfList;
bpList_t bpList; bpList_t bpList;
bool initialized;
Glib::ustring currentPath; Glib::ustring currentPath;
dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true); dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true);
dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t); dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t);

View File

@ -5307,8 +5307,8 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double
Glib::ustring profuse; Glib::ustring profuse;
profuse = "JDCmax"; profuse = "JDCmax";
int limx = 0.05f; float limx = 0.05f;
int limy = 0.04f; float limy = 0.04f;
if (wbpar.itcwb_prim == "srgb") { if (wbpar.itcwb_prim == "srgb") {
profuse = "sRGB"; profuse = "sRGB";

View File

@ -393,7 +393,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
char* dcpy = strdup (absDirPath.c_str()); char* dcpy = strdup (absDirPath.c_str());
char* dir = strtok (dcpy, "/\\"); char* dir = strtok (dcpy, "/\\");
#ifdef _WIN32
int count = 0; int count = 0;
#endif
expandSuccess = true; expandSuccess = true;
#ifndef _WIN32 #ifndef _WIN32
@ -436,8 +438,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
++ix; ++ix;
++i; ++i;
} }
#ifdef _WIN32
count++; count++;
#endif
dir = strtok(nullptr, "/\\"); dir = strtok(nullptr, "/\\");
} }

View File

@ -24,7 +24,7 @@
#include "guiutils.h" #include "guiutils.h"
class EditorPanel; class EditorPanel;
class ExternalEditor; struct ExternalEditor;
class RTWindow; class RTWindow;
class EditWindow : class EditWindow :

View File

@ -445,7 +445,7 @@ void FlatField::setGainMap(bool enabled) {
flatFieldFromMetaData->set_sensitive(enabled); flatFieldFromMetaData->set_sensitive(enabled);
if (!enabled) { if (!enabled) {
idle_register.add( idle_register.add(
[this, enabled]() -> bool [this]() -> bool
{ {
disableListener(); disableListener();
flatFieldFromMetaData->setValue(false); flatFieldFromMetaData->setValue(false);

View File

@ -30,7 +30,7 @@ namespace rtengine
namespace procparams namespace procparams
{ {
class ColorManagementParams; struct ColorManagementParams;
} }

View File

@ -28,7 +28,7 @@ namespace rtengine
namespace procparams namespace procparams
{ {
class ColorManagementParams; struct ColorManagementParams;
} }