From 8056fb38813a42a429673f5a444f14fbd211c1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 17 Oct 2021 00:08:33 +0200 Subject: [PATCH] ksys: Forward declare Actor where possible Reduces build times when Actor.h is modified. --- src/KingSystem/ActorSystem/actBaseProcCreateTask.cpp | 1 + src/KingSystem/Map/mapObject.cpp | 1 + src/KingSystem/Map/mapObject.h | 2 +- src/KingSystem/Map/mapPlacementMgr.cpp | 1 + src/KingSystem/Map/mapPlacementMgr.h | 6 +++++- src/KingSystem/Quest/qstStep.cpp | 1 + src/KingSystem/Quest/qstStep.h | 6 +++++- 7 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/KingSystem/ActorSystem/actBaseProcCreateTask.cpp b/src/KingSystem/ActorSystem/actBaseProcCreateTask.cpp index e69b0cb6..9573ee6c 100644 --- a/src/KingSystem/ActorSystem/actBaseProcCreateTask.cpp +++ b/src/KingSystem/ActorSystem/actBaseProcCreateTask.cpp @@ -1,4 +1,5 @@ #include "KingSystem/ActorSystem/actBaseProcCreateTask.h" +#include "KingSystem/ActorSystem/actBaseProc.h" #include "KingSystem/ActorSystem/actBaseProcHandle.h" #include "KingSystem/ActorSystem/actBaseProcUnit.h" #include "KingSystem/Map/mapObject.h" diff --git a/src/KingSystem/Map/mapObject.cpp b/src/KingSystem/Map/mapObject.cpp index 0b793c9f..d0b57fde 100644 --- a/src/KingSystem/Map/mapObject.cpp +++ b/src/KingSystem/Map/mapObject.cpp @@ -1,4 +1,5 @@ #include "KingSystem/Map/mapObject.h" +#include "KingSystem/ActorSystem/actActor.h" #include "KingSystem/ActorSystem/actBaseProcMgr.h" #include "KingSystem/ActorSystem/actInfoData.h" #include "KingSystem/GameData/gdtManager.h" diff --git a/src/KingSystem/Map/mapObject.h b/src/KingSystem/Map/mapObject.h index 10e9d3c5..39c35eab 100644 --- a/src/KingSystem/Map/mapObject.h +++ b/src/KingSystem/Map/mapObject.h @@ -3,7 +3,6 @@ #include #include #include -#include "KingSystem/ActorSystem/actActor.h" #include "KingSystem/ActorSystem/actActorLinkConstDataAccess.h" #include "KingSystem/ActorSystem/actDebug.h" #include "KingSystem/GameData/gdtFlagHandle.h" @@ -14,6 +13,7 @@ #include "KingSystem/Utils/Types.h" namespace ksys::act { +class Actor; class BaseProc; class BaseProcInitializer; class BaseProcCreateTask; diff --git a/src/KingSystem/Map/mapPlacementMgr.cpp b/src/KingSystem/Map/mapPlacementMgr.cpp index 3ca5b27c..78e3df81 100644 --- a/src/KingSystem/Map/mapPlacementMgr.cpp +++ b/src/KingSystem/Map/mapPlacementMgr.cpp @@ -1,5 +1,6 @@ #include "KingSystem/Map/mapPlacementMgr.h" #include +#include "KingSystem/ActorSystem/actActor.h" #include "KingSystem/ActorSystem/actActorCreator.h" #include "KingSystem/ActorSystem/actClusteredRenderer.h" #include "KingSystem/ActorSystem/actInfoData.h" diff --git a/src/KingSystem/Map/mapPlacementMgr.h b/src/KingSystem/Map/mapPlacementMgr.h index 28ac2700..3cd10767 100644 --- a/src/KingSystem/Map/mapPlacementMgr.h +++ b/src/KingSystem/Map/mapPlacementMgr.h @@ -3,10 +3,14 @@ #include #include #include +#include +#include +#include #include -#include "KingSystem/ActorSystem/actActor.h" +#include "KingSystem/Utils/Types.h" namespace ksys::act { +class Actor; class ClusteredRenderer; class InstParamPack; } // namespace ksys::act diff --git a/src/KingSystem/Quest/qstStep.cpp b/src/KingSystem/Quest/qstStep.cpp index b20e32f9..858c18c9 100644 --- a/src/KingSystem/Quest/qstStep.cpp +++ b/src/KingSystem/Quest/qstStep.cpp @@ -1,5 +1,6 @@ #include "KingSystem/Quest/qstStep.h" #include +#include "KingSystem/ActorSystem/actActor.h" #include "KingSystem/Quest/qstActorData.h" #include "KingSystem/Quest/qstIndicator.h" diff --git a/src/KingSystem/Quest/qstStep.h b/src/KingSystem/Quest/qstStep.h index 551b3c92..59d86d25 100644 --- a/src/KingSystem/Quest/qstStep.h +++ b/src/KingSystem/Quest/qstStep.h @@ -2,12 +2,16 @@ #include #include -#include "KingSystem/ActorSystem/actActor.h" +#include #include "KingSystem/ActorSystem/actBaseProcLink.h" #include "KingSystem/GameData/gdtFlagHandle.h" #include "KingSystem/Utils/Byaml/Byaml.h" #include "KingSystem/Utils/Types.h" +namespace ksys::act { +class Actor; +} + namespace ksys::qst { struct ActorData;