diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index d136d6a21..c5cfc26fa 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -638,7 +638,7 @@ CameraConst::update_globalGreenEquilibration(bool other) } bool -CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) +CameraConstantsStore::parse_camera_constants_file(const Glib::ustring& filename_) { // read the file into a single long string const char *filename = filename_.c_str(); @@ -809,7 +809,7 @@ CameraConstantsStore::~CameraConstantsStore() } } -void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSettingsDir) +void CameraConstantsStore::init(const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir) { parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json")); diff --git a/rtengine/camconst.h b/rtengine/camconst.h index 1096e1767..fbc16cb13 100644 --- a/rtengine/camconst.h +++ b/rtengine/camconst.h @@ -3,10 +3,16 @@ */ #pragma once -#include #include #include +namespace Glib +{ + +class ustring; + +} + namespace rtengine { @@ -62,11 +68,11 @@ private: std::map mCameraConstants; CameraConstantsStore(); - bool parse_camera_constants_file(Glib::ustring filename); + bool parse_camera_constants_file(const Glib::ustring& filename); public: ~CameraConstantsStore(); - void init(Glib::ustring baseDir, Glib::ustring userSettingsDir); + void init(const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir); static CameraConstantsStore *getInstance(void); CameraConst *get(const char make[], const char model[]); }; diff --git a/rtengine/color.h b/rtengine/color.h index 211615de1..8e0015c42 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -20,7 +20,6 @@ #pragma once #include -#include #include "rt_math.h" #include "LUT.h" @@ -30,6 +29,13 @@ #define SAT(a,b,c) ((float)max(a,b,c)-(float)min(a,b,c))/(float)max(a,b,c) +namespace Glib +{ + +class ustring; + +} + namespace rtengine { diff --git a/rtengine/curves.cc b/rtengine/curves.cc index b2105a091..35a38d3b8 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -21,8 +21,7 @@ #include #include #include -#include -#include +#include #include "rt_math.h" @@ -2186,7 +2185,7 @@ void PerceptualToneCurve::init() } } -void PerceptualToneCurve::initApplyState(PerceptualToneCurveState & state, Glib::ustring workingSpace) const +void PerceptualToneCurve::initApplyState(PerceptualToneCurveState & state, const Glib::ustring &workingSpace) const { // Get the curve's contrast value, and convert to a chroma scaling diff --git a/rtengine/curves.h b/rtengine/curves.h index bc8193b76..27f5a8adc 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -22,12 +22,9 @@ #include #include -#include - #include "rt_math.h" #include "flatcurvetypes.h" #include "diagonalcurvetypes.h" -#include "pipettebuffer.h" #include "noncopyable.h" #include "LUT.h" #include "sleef.h" @@ -37,6 +34,13 @@ #define CLIPI(a) ((a)>0?((a)<65534?(a):65534):0) +namespace Glib +{ + +class ustring; + +} + using namespace std; namespace rtengine @@ -940,7 +944,7 @@ private: float calculateToneCurveContrastValue() const; public: static void init(); - void initApplyState(PerceptualToneCurveState & state, Glib::ustring workingSpace) const; + void initApplyState(PerceptualToneCurveState & state, const Glib::ustring& workingSpace) const; void BatchApply(const size_t start, const size_t end, float *r, float *g, float *b, const PerceptualToneCurveState &state) const; }; diff --git a/rtengine/diagonalcurves.cc b/rtengine/diagonalcurves.cc index bb20b7cc1..e81f2fe92 100644 --- a/rtengine/diagonalcurves.cc +++ b/rtengine/diagonalcurves.cc @@ -16,8 +16,6 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include -#include #include "curves.h" #include #include diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 7309dd91f..c2e9dfd3b 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -20,7 +20,6 @@ #include -#include #include #include "alignedbuffer.h" @@ -41,6 +40,13 @@ #define CHECK_BOUNDS 0 +namespace Glib +{ + +class ustring; + +} + namespace rtengine { diff --git a/rtengine/imagedata.h b/rtengine/imagedata.h index ff8ed4b86..5765d9aec 100644 --- a/rtengine/imagedata.h +++ b/rtengine/imagedata.h @@ -23,12 +23,18 @@ #include #include -#include #include #include "imageio.h" +namespace Glib +{ + +class ustring; + +} + namespace rtexif { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 8f4ae7771..6538bd6b1 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -19,11 +19,17 @@ #pragma once #include +#include #include "coord2d.h" #include "gamutwarning.h" -#include "pipettebuffer.h" +namespace Glib +{ + +class ustring; + +} template class LUT; @@ -44,6 +50,7 @@ class FramesMetaData; class LensCorrection; class NoiseCurve; class OpacityCurve; +class PipetteBuffer; class ToneCurve; class WavCurve; class WavOpacityCurveBY; diff --git a/rtengine/previewimage.h b/rtengine/previewimage.h index e6c3ea070..2143509a3 100644 --- a/rtengine/previewimage.h +++ b/rtengine/previewimage.h @@ -18,10 +18,16 @@ */ #pragma once -#include #include +namespace Glib +{ + +class ustring; + +} + namespace rtengine { diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index dcc9596f6..c8d657a62 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -18,8 +18,6 @@ */ #pragma once -#include - #include #include "image16.h" @@ -30,6 +28,13 @@ #include "../rtgui/threadutils.h" +namespace Glib +{ + +class ustring; + +} + namespace rtengine { diff --git a/rtgui/previewloader.h b/rtgui/previewloader.h index 9a74ee2eb..a8032fcaf 100644 --- a/rtgui/previewloader.h +++ b/rtgui/previewloader.h @@ -20,10 +20,15 @@ #include -#include - #include "../rtengine/noncopyable.h" +namespace Glib +{ + +class ustring; + +} + class FileBrowserEntry; class PreviewLoaderListener