From 60e57b9ae0c02b416eb23bf1d6219a404e89507f Mon Sep 17 00:00:00 2001 From: TabDragon <31097001+TabDragon@users.noreply.github.com> Date: Wed, 20 Dec 2017 22:58:00 +0100 Subject: [PATCH] Added forward declarations to avoid ring compiler errors --- Source/functions/AbstractionLayers/AbstraktionLayer_Base.h | 1 - .../AbstractionLayers/DestructionPower/DestructionPower.h | 2 +- .../DestructionPower/DestructionPower_Properties.h | 4 +--- Source/functions/solve/classExtension.cpp | 2 -- Source/header.h | 3 ++- Source/header/input.h | 1 + Source/header/solve.h | 3 ++- Source/main.cpp | 2 +- 8 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Source/functions/AbstractionLayers/AbstraktionLayer_Base.h b/Source/functions/AbstractionLayers/AbstraktionLayer_Base.h index 07dab2a..ccb54a8 100644 --- a/Source/functions/AbstractionLayers/AbstraktionLayer_Base.h +++ b/Source/functions/AbstractionLayers/AbstraktionLayer_Base.h @@ -4,7 +4,6 @@ #include #include #include "../../header/solve.h" -#include "../../header/input.h" using namespace std; diff --git a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h index 09f585f..0aca98f 100644 --- a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h +++ b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h @@ -15,7 +15,7 @@ #include #include -class DestructionPower : public AbstraktionLayer_Base +class DestructionPower : public AbstraktionLayer_Base { public: void PreProcessing(const vector* partArray);//override diff --git a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h index fd5f758..afe4ee9 100644 --- a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h +++ b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h @@ -5,8 +5,6 @@ #ifndef SOURCE_DESTRUCTIONPOWER_PROPERTIES_H #define SOURCE_DESTRUCTIONPOWER_PROPERTIES_H - - #include #include "DestructionPower.h" @@ -32,4 +30,4 @@ private: }; -#endif //SOURCE_ABSTRACTIONLAYER_1_PROPERTIES_H +#endif //SOURCE_DESTRUCTIONPOWER_PROPERTIES_H diff --git a/Source/functions/solve/classExtension.cpp b/Source/functions/solve/classExtension.cpp index 8037044..03f9dc4 100755 --- a/Source/functions/solve/classExtension.cpp +++ b/Source/functions/solve/classExtension.cpp @@ -1,7 +1,5 @@ #include "../../header.h" - - //use this in second abstraction layer maybe ey? void createRandomAbstraction2() { diff --git a/Source/header.h b/Source/header.h index 3146629..38eb655 100755 --- a/Source/header.h +++ b/Source/header.h @@ -14,6 +14,7 @@ using namespace std; /** * IMPORTANT: Each new layer must be included there, to avoid compile errors */ -#include "functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp" +#include "functions/AbstractionLayers/Layer1/AbstractionLayer_1.h" +#include "functions/AbstractionLayers/DestructionPower/DestructionPower.h" #include "header/solve.h" diff --git a/Source/header/input.h b/Source/header/input.h index 3db8cc7..eda76c8 100755 --- a/Source/header/input.h +++ b/Source/header/input.h @@ -4,6 +4,7 @@ #include #include "../functions/AbstractionLayers/Layer1/AbstractionLayer_1_Properties.h" #include "../functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h" + class Part { public: diff --git a/Source/header/solve.h b/Source/header/solve.h index ab722ff..034c193 100755 --- a/Source/header/solve.h +++ b/Source/header/solve.h @@ -3,10 +3,11 @@ #include #include -#include "input.h" #include #include +class Part; + using namespace std; class coor diff --git a/Source/main.cpp b/Source/main.cpp index 72e2ef7..e50a271 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -1,9 +1,9 @@ #include "header.h" +#include "header/input.h" int LogEntry::randomed(0); unsigned int PuzzlePiece::idcount(0); - int main() {