diff --git a/components/detournavigator/asyncnavmeshupdater.cpp b/components/detournavigator/asyncnavmeshupdater.cpp index a0c9cba613..8d43449f87 100644 --- a/components/detournavigator/asyncnavmeshupdater.cpp +++ b/components/detournavigator/asyncnavmeshupdater.cpp @@ -48,32 +48,6 @@ namespace 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(value) << ")"; - } - AsyncNavMeshUpdater::AsyncNavMeshUpdater(const Settings& settings, TileCachedRecastMeshManager& recastMeshManager, OffMeshConnectionsManager& offMeshConnectionsManager) : mSettings(settings) diff --git a/components/detournavigator/navmeshcacheitem.hpp b/components/detournavigator/navmeshcacheitem.hpp index 5558f4e1f5..ac68caedb3 100644 --- a/components/detournavigator/navmeshcacheitem.hpp +++ b/components/detournavigator/navmeshcacheitem.hpp @@ -10,6 +10,7 @@ #include #include +#include struct dtMeshTile; @@ -33,6 +34,32 @@ namespace DetourNavigator return (static_cast(value) & static_cast(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(value) << ")"; + } + class UpdateNavMeshStatusBuilder { public: