mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
Move operator<< for UpdateNavMeshStatus to header
This commit is contained in:
parent
3c6f145753
commit
9460a8760e
2 changed files with 27 additions and 26 deletions
|
@ -48,32 +48,6 @@ namespace
|
||||||
|
|
||||||
namespace DetourNavigator
|
namespace DetourNavigator
|
||||||
{
|
{
|
||||||
static std::ostream& operator <<(std::ostream& stream, UpdateNavMeshStatus value)
|
|
||||||
{
|
|
||||||
switch (value)
|
|
||||||
{
|
|
||||||
case UpdateNavMeshStatus::ignored:
|
|
||||||
return stream << "ignore";
|
|
||||||
case UpdateNavMeshStatus::removed:
|
|
||||||
return stream << "removed";
|
|
||||||
case UpdateNavMeshStatus::added:
|
|
||||||
return stream << "add";
|
|
||||||
case UpdateNavMeshStatus::replaced:
|
|
||||||
return stream << "replaced";
|
|
||||||
case UpdateNavMeshStatus::failed:
|
|
||||||
return stream << "failed";
|
|
||||||
case UpdateNavMeshStatus::lost:
|
|
||||||
return stream << "lost";
|
|
||||||
case UpdateNavMeshStatus::cached:
|
|
||||||
return stream << "cached";
|
|
||||||
case UpdateNavMeshStatus::unchanged:
|
|
||||||
return stream << "unchanged";
|
|
||||||
case UpdateNavMeshStatus::restored:
|
|
||||||
return stream << "restored";
|
|
||||||
}
|
|
||||||
return stream << "unknown(" << static_cast<unsigned>(value) << ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
AsyncNavMeshUpdater::AsyncNavMeshUpdater(const Settings& settings, TileCachedRecastMeshManager& recastMeshManager,
|
AsyncNavMeshUpdater::AsyncNavMeshUpdater(const Settings& settings, TileCachedRecastMeshManager& recastMeshManager,
|
||||||
OffMeshConnectionsManager& offMeshConnectionsManager)
|
OffMeshConnectionsManager& offMeshConnectionsManager)
|
||||||
: mSettings(settings)
|
: mSettings(settings)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <components/misc/guarded.hpp>
|
#include <components/misc/guarded.hpp>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
struct dtMeshTile;
|
struct dtMeshTile;
|
||||||
|
|
||||||
|
@ -33,6 +34,32 @@ namespace DetourNavigator
|
||||||
return (static_cast<unsigned>(value) & static_cast<unsigned>(UpdateNavMeshStatus::failed)) == 0;
|
return (static_cast<unsigned>(value) & static_cast<unsigned>(UpdateNavMeshStatus::failed)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::ostream& operator <<(std::ostream& stream, UpdateNavMeshStatus value)
|
||||||
|
{
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case UpdateNavMeshStatus::ignored:
|
||||||
|
return stream << "ignore";
|
||||||
|
case UpdateNavMeshStatus::removed:
|
||||||
|
return stream << "removed";
|
||||||
|
case UpdateNavMeshStatus::added:
|
||||||
|
return stream << "add";
|
||||||
|
case UpdateNavMeshStatus::replaced:
|
||||||
|
return stream << "replaced";
|
||||||
|
case UpdateNavMeshStatus::failed:
|
||||||
|
return stream << "failed";
|
||||||
|
case UpdateNavMeshStatus::lost:
|
||||||
|
return stream << "lost";
|
||||||
|
case UpdateNavMeshStatus::cached:
|
||||||
|
return stream << "cached";
|
||||||
|
case UpdateNavMeshStatus::unchanged:
|
||||||
|
return stream << "unchanged";
|
||||||
|
case UpdateNavMeshStatus::restored:
|
||||||
|
return stream << "restored";
|
||||||
|
}
|
||||||
|
return stream << "unknown(" << static_cast<unsigned>(value) << ")";
|
||||||
|
}
|
||||||
|
|
||||||
class UpdateNavMeshStatusBuilder
|
class UpdateNavMeshStatusBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue