1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 09:39:56 +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 <components/detournavigator/areatype.hpp>
#include "pathfinding.hpp"
#include "obstacle.hpp"
#include "aistate.hpp"
#include "aipackagetypeid.hpp"
#include "aitimer.hpp"
#include "aistatefwd.hpp"
#include "../mwworld/ptr.hpp"
namespace ESM

View File

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

View File

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