reduce some include dependencies

This commit is contained in:
Ingo Weyrich 2020-01-17 23:18:48 +01:00
parent 906347ab2d
commit d82ea3af02
12 changed files with 71 additions and 23 deletions

View File

@ -638,7 +638,7 @@ CameraConst::update_globalGreenEquilibration(bool other)
} }
bool 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 // read the file into a single long string
const char *filename = filename_.c_str(); 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")); parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json"));

View File

@ -3,10 +3,16 @@
*/ */
#pragma once #pragma once
#include <glibmm/ustring.h>
#include <map> #include <map>
#include <vector> #include <vector>
namespace Glib
{
class ustring;
}
namespace rtengine namespace rtengine
{ {
@ -62,11 +68,11 @@ private:
std::map<std::string, CameraConst *> mCameraConstants; std::map<std::string, CameraConst *> mCameraConstants;
CameraConstantsStore(); CameraConstantsStore();
bool parse_camera_constants_file(Glib::ustring filename); bool parse_camera_constants_file(const Glib::ustring& filename);
public: public:
~CameraConstantsStore(); ~CameraConstantsStore();
void init(Glib::ustring baseDir, Glib::ustring userSettingsDir); void init(const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir);
static CameraConstantsStore *getInstance(void); static CameraConstantsStore *getInstance(void);
CameraConst *get(const char make[], const char model[]); CameraConst *get(const char make[], const char model[]);
}; };

View File

@ -20,7 +20,6 @@
#pragma once #pragma once
#include <array> #include <array>
#include <glibmm/ustring.h>
#include "rt_math.h" #include "rt_math.h"
#include "LUT.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) #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 namespace rtengine
{ {

View File

@ -21,8 +21,7 @@
#include <memory> #include <memory>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <glib.h> #include <glibmm/ustring.h>
#include <glib/gstdio.h>
#include "rt_math.h" #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 // Get the curve's contrast value, and convert to a chroma scaling

View File

@ -22,12 +22,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <glibmm/ustring.h>
#include "rt_math.h" #include "rt_math.h"
#include "flatcurvetypes.h" #include "flatcurvetypes.h"
#include "diagonalcurvetypes.h" #include "diagonalcurvetypes.h"
#include "pipettebuffer.h"
#include "noncopyable.h" #include "noncopyable.h"
#include "LUT.h" #include "LUT.h"
#include "sleef.h" #include "sleef.h"
@ -37,6 +34,13 @@
#define CLIPI(a) ((a)>0?((a)<65534?(a):65534):0) #define CLIPI(a) ((a)>0?((a)<65534?(a):65534):0)
namespace Glib
{
class ustring;
}
using namespace std; using namespace std;
namespace rtengine namespace rtengine
@ -940,7 +944,7 @@ private:
float calculateToneCurveContrastValue() const; float calculateToneCurveContrastValue() const;
public: public:
static void init(); 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; void BatchApply(const size_t start, const size_t end, float *r, float *g, float *b, const PerceptualToneCurveState &state) const;
}; };

View File

@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <glib.h>
#include <glib/gstdio.h>
#include "curves.h" #include "curves.h"
#include <cmath> #include <cmath>
#include <vector> #include <vector>

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <glibmm/ustring.h>
#include <lcms2.h> #include <lcms2.h>
#include "alignedbuffer.h" #include "alignedbuffer.h"
@ -41,6 +40,13 @@
#define CHECK_BOUNDS 0 #define CHECK_BOUNDS 0
namespace Glib
{
class ustring;
}
namespace rtengine namespace rtengine
{ {

View File

@ -23,12 +23,18 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <glibmm/ustring.h>
#include <libiptcdata/iptc-data.h> #include <libiptcdata/iptc-data.h>
#include "imageio.h" #include "imageio.h"
namespace Glib
{
class ustring;
}
namespace rtexif namespace rtexif
{ {

View File

@ -19,11 +19,17 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <vector>
#include "coord2d.h" #include "coord2d.h"
#include "gamutwarning.h" #include "gamutwarning.h"
#include "pipettebuffer.h"
namespace Glib
{
class ustring;
}
template<typename T> template<typename T>
class LUT; class LUT;
@ -44,6 +50,7 @@ class FramesMetaData;
class LensCorrection; class LensCorrection;
class NoiseCurve; class NoiseCurve;
class OpacityCurve; class OpacityCurve;
class PipetteBuffer;
class ToneCurve; class ToneCurve;
class WavCurve; class WavCurve;
class WavOpacityCurveBY; class WavOpacityCurveBY;

View File

@ -18,10 +18,16 @@
*/ */
#pragma once #pragma once
#include <glibmm/ustring.h>
#include <cairomm/cairomm.h> #include <cairomm/cairomm.h>
namespace Glib
{
class ustring;
}
namespace rtengine namespace rtengine
{ {

View File

@ -18,8 +18,6 @@
*/ */
#pragma once #pragma once
#include <glibmm/ustring.h>
#include <lcms2.h> #include <lcms2.h>
#include "image16.h" #include "image16.h"
@ -30,6 +28,13 @@
#include "../rtgui/threadutils.h" #include "../rtgui/threadutils.h"
namespace Glib
{
class ustring;
}
namespace rtengine namespace rtengine
{ {

View File

@ -20,10 +20,15 @@
#include <set> #include <set>
#include <glibmm/ustring.h>
#include "../rtengine/noncopyable.h" #include "../rtengine/noncopyable.h"
namespace Glib
{
class ustring;
}
class FileBrowserEntry; class FileBrowserEntry;
class PreviewLoaderListener class PreviewLoaderListener