Speeded up compile time

Reworked *_global.h heavy inclusions
This commit is contained in:
Michaël Lemaire 2015-11-18 19:37:00 +01:00
parent 65b4cd150c
commit 6166031c8b
28 changed files with 50 additions and 17 deletions

View file

@ -1,6 +1,7 @@
#include "ColorProfile.h"
#include "PackStream.h"
#include <cmath>
ColorProfile::ColorProfile() {
setToneMapping(TONE_MAPPING_UNCHARTED, 1.6);

View file

@ -3,6 +3,8 @@
#include "basics_global.h"
#include <vector>
namespace paysages {
namespace basics {

View file

@ -1,6 +1,7 @@
#include "Texture2D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"

View file

@ -1,6 +1,7 @@
#include "Texture3D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"

View file

@ -1,6 +1,7 @@
#include "Texture4D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"

View file

@ -1,15 +1,14 @@
#ifndef BASICS_GLOBAL_H
#define BASICS_GLOBAL_H
#include <QtCore/qglobal.h>
#include "system_global.h"
#if defined(BASICS_LIBRARY)
#define BASICSSHARED_EXPORT Q_DECL_EXPORT
#else
#define BASICSSHARED_EXPORT Q_DECL_IMPORT
#endif
#include "system_global.h"
namespace paysages {
namespace basics {
class Vector3;

View file

@ -7,6 +7,7 @@
#include "DiffManager.h"
#include <cassert>
#include <algorithm>
DefinitionNode::DefinitionNode(DefinitionNode *parent, const std::string &name, const std::string &type_name)
: parent(parent), type_name(type_name), name(name) {

View file

@ -3,6 +3,8 @@
#include "definition_global.h"
#include <vector>
namespace paysages {
namespace definition {

View file

@ -1,5 +1,6 @@
#include "DiffManager.h"
#include <algorithm>
#include "DefinitionNode.h"
#include "DefinitionDiff.h"
#include "DefinitionWatcher.h"

View file

@ -1,6 +1,7 @@
#include "PaintedGrid.h"
#include <cassert>
#include <cmath>
#include "Memory.h"
#include "Interpolation.h"
#include "PaintedGridData.h"

View file

@ -1,5 +1,6 @@
#include "TerrainDefinition.h"
#include <cmath>
#include "TerrainHeightMap.h"
#include "NoiseGenerator.h"
#include "PackStream.h"

View file

@ -1,7 +1,7 @@
#ifndef DEFINITION_GLOBAL_H
#define DEFINITION_GLOBAL_H
#include <QtCore/qglobal.h>
#include "basics_global.h"
#if defined(DEFINITION_LIBRARY)
#define DEFINITIONSHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define DEFINITIONSHARED_EXPORT Q_DECL_IMPORT
#endif
#include "basics_global.h"
namespace paysages {
namespace definition {
class DefinitionNode;

View file

@ -1,7 +1,7 @@
#ifndef OPENGL_GLOBAL_H
#define OPENGL_GLOBAL_H
#include <QtCore/qglobal.h>
#include "software_global.h"
#if defined(OPENGL_LIBRARY)
#define OPENGLSHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define OPENGLSHARED_EXPORT Q_DECL_IMPORT
#endif
#include "software_global.h"
namespace paysages {
namespace opengl {
class WidgetExplorer;

View file

@ -3,6 +3,8 @@
#include "software_global.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -7,6 +7,7 @@
#include "BaseCloudLayerRenderer.h"
#include "CloudBasicLayerRenderer.h"
#include "CameraDefinition.h"
#include "Logs.h"
#include "clouds/BaseCloudsModel.h"
#include "clouds/CloudModelAltoCumulus.h"
@ -99,7 +100,7 @@ BaseCloudLayerRenderer *CloudsRenderer::getLayerRenderer(unsigned int layer) {
if (layer < layer_renderers.size()) {
return layer_renderers[layer];
} else {
qWarning("Asked for unknown layer renderer %d", layer);
Logs::warning() << "Asked for unknown layer renderer " << layer << std::endl;
return fake_renderer;
}
}
@ -108,7 +109,7 @@ BaseCloudsModel *CloudsRenderer::getLayerModel(unsigned int layer) {
if (layer < layer_models.size()) {
return layer_models[layer];
} else {
qWarning("Asked for unknown layer model %d", layer);
Logs::warning() << "Asked for unknown layer model" << layer << std::endl;
return fake_model;
}
}
@ -120,7 +121,7 @@ void CloudsRenderer::setLayerModel(unsigned int layer, BaseCloudsModel *model, b
}
layer_models[layer] = model;
} else {
qWarning("Asked to set an unknown layer model %d", layer);
Logs::warning() << "Asked to set an unknown layer model" << layer << std::endl;
delete model;
}
}

View file

@ -5,6 +5,8 @@
#include "LightFilter.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -5,6 +5,8 @@
#include "SpaceSegment.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -1,5 +1,7 @@
#include "GodRaysResult.h"
#include <cmath>
GodRaysResult::GodRaysResult(double inside_length, double full_length)
: inside_length(inside_length), full_length(full_length) {
}

View file

@ -3,6 +3,8 @@
#include "software_global.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -5,6 +5,8 @@
#include "LightComponent.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -1,5 +1,6 @@
#include "LightingManager.h"
#include <algorithm>
#include "LightFilter.h"
#include "LightComponent.h"
#include "LightStatus.h"

View file

@ -5,6 +5,8 @@
#include "LightComponent.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -5,6 +5,8 @@
#include "SoftwareRenderer.h"
#include <vector>
namespace paysages {
namespace software {

View file

@ -1,7 +1,7 @@
#ifndef SOFTWARE_GLOBAL_H
#define SOFTWARE_GLOBAL_H
#include <QtCore/qglobal.h>
#include "definition_global.h"
#if defined(SOFTWARE_LIBRARY)
#define SOFTWARESHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define SOFTWARESHARED_EXPORT Q_DECL_IMPORT
#endif
#include "definition_global.h"
namespace paysages {
namespace software {
class SoftwareRenderer;

View file

@ -1,5 +1,6 @@
#include "Memory.h"
#include <string>
#include <cstring>
#include <cassert>

View file

@ -5,6 +5,7 @@
class QFile;
class QDataStream;
class QByteArray;
namespace paysages {
namespace system {

View file

@ -3,6 +3,8 @@
#include "system_global.h"
#include <vector>
namespace paysages {
namespace system {

View file

@ -1,11 +1,17 @@
#ifndef SYSTEM_GLOBAL_H
#define SYSTEM_GLOBAL_H
#ifndef __MINGW32__
#include <string>
#ifdef __MINGW32__
#define Q_DECL_EXPORT __declspec(dllexport)
#define Q_DECL_IMPORT __declspec(dllimport)
#else
#define PAYSAGES_USE_INLINING 1
#define Q_DECL_EXPORT __attribute__((visibility("default")))
#define Q_DECL_IMPORT __attribute__((visibility("default")))
#endif
#include <QtCore/qglobal.h>
#if defined(SYSTEM_LIBRARY)
#define SYSTEMSHARED_EXPORT Q_DECL_EXPORT
#else