1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-02 16:36:41 +00:00

Use forward declarations instead of including aistate.hpp

This commit is contained in:
elsid 2022-07-16 12:49:01 +02:00
parent f5c2e09df9
commit d2b7253c7f
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
4 changed files with 19 additions and 9 deletions

View file

@ -4,12 +4,13 @@
#include <memory> #include <memory>
#include <components/detournavigator/areatype.hpp> #include <components/detournavigator/areatype.hpp>
#include "pathfinding.hpp" #include "pathfinding.hpp"
#include "obstacle.hpp" #include "obstacle.hpp"
#include "aistate.hpp"
#include "aipackagetypeid.hpp" #include "aipackagetypeid.hpp"
#include "aitimer.hpp" #include "aitimer.hpp"
#include "aistatefwd.hpp"
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
namespace ESM namespace ESM

View file

@ -27,10 +27,6 @@ namespace MWMechanics
{ {
class AiPackage; class AiPackage;
class CharacterController; class CharacterController;
template< class Base > class DerivedClassStorage;
struct AiTemporaryBase;
typedef DerivedClassStorage<AiTemporaryBase> AiState;
using AiPackages = std::vector<std::shared_ptr<AiPackage>>; using AiPackages = std::vector<std::shared_ptr<AiPackage>>;

View file

@ -1,6 +1,7 @@
#ifndef AISTATE_H #ifndef AISTATE_H
#define AISTATE_H #define AISTATE_H
#include "aistatefwd.hpp"
#include "aitemporarybase.hpp" #include "aitemporarybase.hpp"
namespace MWMechanics namespace MWMechanics
@ -71,9 +72,6 @@ namespace MWMechanics
delete mStorage; delete mStorage;
} }
}; };
/// \brief Container for AI package status.
typedef DerivedClassStorage<AiTemporaryBase> AiState;
} }
#endif // AISTATE_H #endif // AISTATE_H

View file

@ -0,0 +1,15 @@
#ifndef OPENMW_MWMECHANICS_AISTATEFWD_H
#define OPENMW_MWMECHANICS_AISTATEFWD_H
namespace MWMechanics
{
template <class Base>
class DerivedClassStorage;
struct AiTemporaryBase;
/// \brief Container for AI package status.
using AiState = DerivedClassStorage<AiTemporaryBase>;
}
#endif