From 62b0781f7dd59084c717d68803b900d963a9411c Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 25 Oct 2020 00:33:41 +0200 Subject: [PATCH 1/4] use std::optional instead of boost::optional --- apps/openmw/mwsound/regionsoundselector.cpp | 2 +- apps/openmw/mwsound/regionsoundselector.hpp | 2 +- .../detournavigator/asyncnavmeshupdater.cpp | 6 +++--- .../detournavigator/asyncnavmeshupdater.hpp | 6 +++--- .../detournavigator/cachedrecastmeshmanager.cpp | 4 ++-- .../detournavigator/cachedrecastmeshmanager.hpp | 4 ++-- .../findrandompointaroundcircle.cpp | 10 +++++----- .../findrandompointaroundcircle.hpp | 2 +- components/detournavigator/findsmoothpath.cpp | 6 +++--- components/detournavigator/findsmoothpath.hpp | 8 ++++---- components/detournavigator/navigator.cpp | 8 ++++---- components/detournavigator/navigator.hpp | 2 +- components/detournavigator/recastmeshmanager.cpp | 8 ++++---- components/detournavigator/recastmeshmanager.hpp | 4 ++-- components/detournavigator/settings.cpp | 4 ++-- components/detournavigator/settings.hpp | 2 +- .../tilecachedrecastmeshmanager.cpp | 16 ++++++++-------- .../tilecachedrecastmeshmanager.hpp | 6 +++--- 18 files changed, 50 insertions(+), 50 deletions(-) diff --git a/apps/openmw/mwsound/regionsoundselector.cpp b/apps/openmw/mwsound/regionsoundselector.cpp index ac5f66721d..c95ed9c72b 100644 --- a/apps/openmw/mwsound/regionsoundselector.cpp +++ b/apps/openmw/mwsound/regionsoundselector.cpp @@ -18,7 +18,7 @@ namespace MWSound } } - boost::optional RegionSoundSelector::getNextRandom(float duration, const std::string& regionName, + std::optional RegionSoundSelector::getNextRandom(float duration, const std::string& regionName, const MWBase::World& world) { mTimePassed += duration; diff --git a/apps/openmw/mwsound/regionsoundselector.hpp b/apps/openmw/mwsound/regionsoundselector.hpp index 00a2d5ca85..0dce5a7aa1 100644 --- a/apps/openmw/mwsound/regionsoundselector.hpp +++ b/apps/openmw/mwsound/regionsoundselector.hpp @@ -15,7 +15,7 @@ namespace MWSound class RegionSoundSelector { public: - boost::optional getNextRandom(float duration, const std::string& regionName, + std::optional getNextRandom(float duration, const std::string& regionName, const MWBase::World& world); private: diff --git a/components/detournavigator/asyncnavmeshupdater.cpp b/components/detournavigator/asyncnavmeshupdater.cpp index 878b8130a9..1ac928f077 100644 --- a/components/detournavigator/asyncnavmeshupdater.cpp +++ b/components/detournavigator/asyncnavmeshupdater.cpp @@ -198,7 +198,7 @@ namespace DetourNavigator return isSuccess(status); } - boost::optional AsyncNavMeshUpdater::getNextJob() + std::optional AsyncNavMeshUpdater::getNextJob() { std::unique_lock lock(mMutex); @@ -217,7 +217,7 @@ namespace DetourNavigator mFirstStart.lock()->reset(); if (mJobs.empty() && getTotalThreadJobsUnsafe() == 0) mDone.notify_all(); - return boost::none; + return std::nullopt; } Log(Debug::Debug) << "Got " << mJobs.size() << " navigator jobs and " @@ -239,7 +239,7 @@ namespace DetourNavigator } } - boost::optional AsyncNavMeshUpdater::getJob(Jobs& jobs, Pushed& pushed, bool changeLastUpdate) + std::optional AsyncNavMeshUpdater::getJob(Jobs& jobs, Pushed& pushed, bool changeLastUpdate) { const auto now = std::chrono::steady_clock::now(); diff --git a/components/detournavigator/asyncnavmeshupdater.hpp b/components/detournavigator/asyncnavmeshupdater.hpp index 26f886512a..fcdc0f21af 100644 --- a/components/detournavigator/asyncnavmeshupdater.hpp +++ b/components/detournavigator/asyncnavmeshupdater.hpp @@ -106,7 +106,7 @@ namespace DetourNavigator Jobs mJobs; std::map> mPushed; Misc::ScopeGuarded mPlayerTile; - Misc::ScopeGuarded> mFirstStart; + Misc::ScopeGuarded> mFirstStart; NavMeshTilesCache mNavMeshTilesCache; Misc::ScopeGuarded>> mProcessingTiles; std::map> mLastUpdates; @@ -117,9 +117,9 @@ namespace DetourNavigator bool processJob(const Job& job); - boost::optional getNextJob(); + std::optional getNextJob(); - boost::optional getJob(Jobs& jobs, Pushed& pushed, bool changeLastUpdate); + std::optional getJob(Jobs& jobs, Pushed& pushed, bool changeLastUpdate); void postThreadJob(Job&& job, Queue& queue); diff --git a/components/detournavigator/cachedrecastmeshmanager.cpp b/components/detournavigator/cachedrecastmeshmanager.cpp index da0f6c8747..90b4266104 100644 --- a/components/detournavigator/cachedrecastmeshmanager.cpp +++ b/components/detournavigator/cachedrecastmeshmanager.cpp @@ -25,7 +25,7 @@ namespace DetourNavigator return true; } - boost::optional CachedRecastMeshManager::removeObject(const ObjectId id) + std::optional CachedRecastMeshManager::removeObject(const ObjectId id) { const auto object = mImpl.removeObject(id); if (object) @@ -42,7 +42,7 @@ namespace DetourNavigator return true; } - boost::optional CachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition) + std::optional CachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition) { const auto water = mImpl.removeWater(cellPosition); if (water) diff --git a/components/detournavigator/cachedrecastmeshmanager.hpp b/components/detournavigator/cachedrecastmeshmanager.hpp index 5efb315e8e..8ce2e48c21 100644 --- a/components/detournavigator/cachedrecastmeshmanager.hpp +++ b/components/detournavigator/cachedrecastmeshmanager.hpp @@ -19,9 +19,9 @@ namespace DetourNavigator bool addWater(const osg::Vec2i& cellPosition, const int cellSize, const btTransform& transform); - boost::optional removeWater(const osg::Vec2i& cellPosition); + std::optional removeWater(const osg::Vec2i& cellPosition); - boost::optional removeObject(const ObjectId id); + std::optional removeObject(const ObjectId id); std::shared_ptr getMesh(); diff --git a/components/detournavigator/findrandompointaroundcircle.cpp b/components/detournavigator/findrandompointaroundcircle.cpp index 263dba68e8..f2e815c918 100644 --- a/components/detournavigator/findrandompointaroundcircle.cpp +++ b/components/detournavigator/findrandompointaroundcircle.cpp @@ -10,12 +10,12 @@ namespace DetourNavigator { - boost::optional findRandomPointAroundCircle(const dtNavMesh& navMesh, const osg::Vec3f& halfExtents, + std::optional findRandomPointAroundCircle(const dtNavMesh& navMesh, const osg::Vec3f& halfExtents, const osg::Vec3f& start, const float maxRadius, const Flags includeFlags, const Settings& settings) { dtNavMeshQuery navMeshQuery; if (!initNavMeshQuery(navMeshQuery, navMesh, settings.mMaxNavMeshQueryNodes)) - return boost::optional(); + return std::optional(); dtQueryFilter queryFilter; queryFilter.setIncludeFlags(includeFlags); @@ -31,7 +31,7 @@ namespace DetourNavigator } if (startRef == 0) - return boost::optional(); + return std::optional(); dtPolyRef resultRef = 0; osg::Vec3f resultPosition; @@ -39,8 +39,8 @@ namespace DetourNavigator []() { return Misc::Rng::rollProbability(); }, &resultRef, resultPosition.ptr()); if (resultRef == 0) - return boost::optional(); + return std::optional(); - return boost::optional(resultPosition); + return std::optional(resultPosition); } } diff --git a/components/detournavigator/findrandompointaroundcircle.hpp b/components/detournavigator/findrandompointaroundcircle.hpp index 841508f67d..fb0b5c5ba4 100644 --- a/components/detournavigator/findrandompointaroundcircle.hpp +++ b/components/detournavigator/findrandompointaroundcircle.hpp @@ -13,7 +13,7 @@ namespace DetourNavigator { struct Settings; - boost::optional findRandomPointAroundCircle(const dtNavMesh& navMesh, const osg::Vec3f& halfExtents, + std::optional findRandomPointAroundCircle(const dtNavMesh& navMesh, const osg::Vec3f& halfExtents, const osg::Vec3f& start, const float maxRadius, const Flags includeFlags, const Settings& settings); } diff --git a/components/detournavigator/findsmoothpath.cpp b/components/detournavigator/findsmoothpath.cpp index ef0341d724..8e443def98 100644 --- a/components/detournavigator/findsmoothpath.cpp +++ b/components/detournavigator/findsmoothpath.cpp @@ -103,7 +103,7 @@ namespace DetourNavigator return result; } - boost::optional getSteerTarget(const dtNavMeshQuery& navQuery, const osg::Vec3f& startPos, + std::optional getSteerTarget(const dtNavMeshQuery& navQuery, const osg::Vec3f& startPos, const osg::Vec3f& endPos, const float minTargetDist, const std::vector& path) { // Find steer target. @@ -117,7 +117,7 @@ namespace DetourNavigator steerPathFlags.data(), steerPathPolys.data(), &nsteerPath, MAX_STEER_POINTS); assert(nsteerPath >= 0); if (!nsteerPath) - return boost::none; + return std::nullopt; // Find vertex far enough to steer to. std::size_t ns = 0; @@ -131,7 +131,7 @@ namespace DetourNavigator } // Failed to find good point to steer to. if (ns >= static_cast(nsteerPath)) - return boost::none; + return std::nullopt; dtVcopy(result.steerPos.ptr(), &steerPath[ns * 3]); result.steerPos.y() = startPos[1]; diff --git a/components/detournavigator/findsmoothpath.hpp b/components/detournavigator/findsmoothpath.hpp index f1de712070..23609ab097 100644 --- a/components/detournavigator/findsmoothpath.hpp +++ b/components/detournavigator/findsmoothpath.hpp @@ -58,7 +58,7 @@ namespace DetourNavigator dtPolyRef steerPosRef; }; - boost::optional getSteerTarget(const dtNavMeshQuery& navQuery, const osg::Vec3f& startPos, + std::optional getSteerTarget(const dtNavMeshQuery& navQuery, const osg::Vec3f& startPos, const osg::Vec3f& endPos, const float minTargetDist, const std::vector& path); template @@ -111,7 +111,7 @@ namespace DetourNavigator std::vector mVisited; }; - inline boost::optional moveAlongSurface(const dtNavMeshQuery& navMeshQuery, + inline std::optional moveAlongSurface(const dtNavMeshQuery& navMeshQuery, const dtPolyRef startRef, const osg::Vec3f& startPos, const osg::Vec3f& endPos, const dtQueryFilter& filter, const std::size_t maxVisitedSize) { @@ -128,7 +128,7 @@ namespace DetourNavigator return {std::move(result)}; } - inline boost::optional> findPath(const dtNavMeshQuery& navMeshQuery, const dtPolyRef startRef, + inline std::optional> findPath(const dtNavMeshQuery& navMeshQuery, const dtPolyRef startRef, const dtPolyRef endRef, const osg::Vec3f& startPos, const osg::Vec3f& endPos, const dtQueryFilter& queryFilter, const std::size_t maxSize) { @@ -144,7 +144,7 @@ namespace DetourNavigator return {std::move(result)}; } - inline boost::optional getPolyHeight(const dtNavMeshQuery& navMeshQuery, const dtPolyRef ref, const osg::Vec3f& pos) + inline std::optional getPolyHeight(const dtNavMeshQuery& navMeshQuery, const dtPolyRef ref, const osg::Vec3f& pos) { float result = 0.0f; const auto status = navMeshQuery.getPolyHeight(ref, pos.ptr(), &result); diff --git a/components/detournavigator/navigator.cpp b/components/detournavigator/navigator.cpp index a58a4f8768..658e539ad9 100644 --- a/components/detournavigator/navigator.cpp +++ b/components/detournavigator/navigator.cpp @@ -3,18 +3,18 @@ namespace DetourNavigator { - boost::optional Navigator::findRandomPointAroundCircle(const osg::Vec3f& agentHalfExtents, + std::optional Navigator::findRandomPointAroundCircle(const osg::Vec3f& agentHalfExtents, const osg::Vec3f& start, const float maxRadius, const Flags includeFlags) const { const auto navMesh = getNavMesh(agentHalfExtents); if (!navMesh) - return boost::optional(); + return std::optional(); const auto settings = getSettings(); const auto result = DetourNavigator::findRandomPointAroundCircle(navMesh->lockConst()->getImpl(), toNavMeshCoordinates(settings, agentHalfExtents), toNavMeshCoordinates(settings, start), toNavMeshCoordinates(settings, maxRadius), includeFlags, settings); if (!result) - return boost::optional(); - return boost::optional(fromNavMeshCoordinates(settings, *result)); + return std::optional(); + return std::optional(fromNavMeshCoordinates(settings, *result)); } } diff --git a/components/detournavigator/navigator.hpp b/components/detournavigator/navigator.hpp index 3e7f541783..a79aa59d42 100644 --- a/components/detournavigator/navigator.hpp +++ b/components/detournavigator/navigator.hpp @@ -220,7 +220,7 @@ namespace DetourNavigator * @param includeFlags setup allowed surfaces for actor to walk. * @return not empty optional with position if point is found and empty optional if point is not found. */ - boost::optional findRandomPointAroundCircle(const osg::Vec3f& agentHalfExtents, + std::optional findRandomPointAroundCircle(const osg::Vec3f& agentHalfExtents, const osg::Vec3f& start, const float maxRadius, const Flags includeFlags) const; virtual RecastMeshTiles getRecastMeshTiles() = 0; diff --git a/components/detournavigator/recastmeshmanager.cpp b/components/detournavigator/recastmeshmanager.cpp index 05f2505964..3796c9816c 100644 --- a/components/detournavigator/recastmeshmanager.cpp +++ b/components/detournavigator/recastmeshmanager.cpp @@ -34,11 +34,11 @@ namespace DetourNavigator return true; } - boost::optional RecastMeshManager::removeObject(const ObjectId id) + std::optional RecastMeshManager::removeObject(const ObjectId id) { const auto object = mObjects.find(id); if (object == mObjects.end()) - return boost::none; + return std::nullopt; const RemovedRecastMeshObject result {object->second->getShape(), object->second->getTransform()}; mObjectsOrder.erase(object->second); mObjects.erase(object); @@ -59,11 +59,11 @@ namespace DetourNavigator return true; } - boost::optional RecastMeshManager::removeWater(const osg::Vec2i& cellPosition) + std::optional RecastMeshManager::removeWater(const osg::Vec2i& cellPosition) { const auto water = mWater.find(cellPosition); if (water == mWater.end()) - return boost::none; + return std::nullopt; ++mRevision; const auto result = *water->second; mWaterOrder.erase(water->second); diff --git a/components/detournavigator/recastmeshmanager.hpp b/components/detournavigator/recastmeshmanager.hpp index f1870ec6b0..47f5f51909 100644 --- a/components/detournavigator/recastmeshmanager.hpp +++ b/components/detournavigator/recastmeshmanager.hpp @@ -43,9 +43,9 @@ namespace DetourNavigator bool addWater(const osg::Vec2i& cellPosition, const int cellSize, const btTransform& transform); - boost::optional removeWater(const osg::Vec2i& cellPosition); + std::optional removeWater(const osg::Vec2i& cellPosition); - boost::optional removeObject(const ObjectId id); + std::optional removeObject(const ObjectId id); std::shared_ptr getMesh(); diff --git a/components/detournavigator/settings.cpp b/components/detournavigator/settings.cpp index 49aec41ff7..977b80cf5f 100644 --- a/components/detournavigator/settings.cpp +++ b/components/detournavigator/settings.cpp @@ -4,10 +4,10 @@ namespace DetourNavigator { - boost::optional makeSettingsFromSettingsManager() + std::optional makeSettingsFromSettingsManager() { if (!::Settings::Manager::getBool("enable", "Navigator")) - return boost::optional(); + return std::optional(); Settings navigatorSettings; diff --git a/components/detournavigator/settings.hpp b/components/detournavigator/settings.hpp index 939d825a5a..290e763a98 100644 --- a/components/detournavigator/settings.hpp +++ b/components/detournavigator/settings.hpp @@ -42,7 +42,7 @@ namespace DetourNavigator std::chrono::milliseconds mMinUpdateInterval; }; - boost::optional makeSettingsFromSettingsManager(); + std::optional makeSettingsFromSettingsManager(); } #endif diff --git a/components/detournavigator/tilecachedrecastmeshmanager.cpp b/components/detournavigator/tilecachedrecastmeshmanager.cpp index 9debe5deac..fddaa88f1d 100644 --- a/components/detournavigator/tilecachedrecastmeshmanager.cpp +++ b/components/detournavigator/tilecachedrecastmeshmanager.cpp @@ -31,12 +31,12 @@ namespace DetourNavigator return result; } - boost::optional TileCachedRecastMeshManager::removeObject(const ObjectId id) + std::optional TileCachedRecastMeshManager::removeObject(const ObjectId id) { const auto object = mObjectsTilesPositions.find(id); if (object == mObjectsTilesPositions.end()) - return boost::none; - boost::optional result; + return std::nullopt; + std::optional result; { auto tiles = mTiles.lock(); for (const auto& tilePosition : object->second) @@ -100,12 +100,12 @@ namespace DetourNavigator return result; } - boost::optional TileCachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition) + std::optional TileCachedRecastMeshManager::removeWater(const osg::Vec2i& cellPosition) { const auto object = mWaterTilesPositions.find(cellPosition); if (object == mWaterTilesPositions.end()) - return boost::none; - boost::optional result; + return std::nullopt; + std::optional result; for (const auto& tilePosition : object->second) { const auto tiles = mTiles.lock(); @@ -168,12 +168,12 @@ namespace DetourNavigator return tile != tiles.end() && tile->second.updateObject(id, transform, areaType); } - boost::optional TileCachedRecastMeshManager::removeTile(const ObjectId id, + std::optional TileCachedRecastMeshManager::removeTile(const ObjectId id, const TilePosition& tilePosition, std::map& tiles) { const auto tile = tiles.find(tilePosition); if (tile == tiles.end()) - return boost::optional(); + return std::optional(); const auto tileResult = tile->second.removeObject(id); if (tile->second.isEmpty()) { diff --git a/components/detournavigator/tilecachedrecastmeshmanager.hpp b/components/detournavigator/tilecachedrecastmeshmanager.hpp index 557cde1bed..fa192bd732 100644 --- a/components/detournavigator/tilecachedrecastmeshmanager.hpp +++ b/components/detournavigator/tilecachedrecastmeshmanager.hpp @@ -69,11 +69,11 @@ namespace DetourNavigator return changed; } - boost::optional removeObject(const ObjectId id); + std::optional removeObject(const ObjectId id); bool addWater(const osg::Vec2i& cellPosition, const int cellSize, const btTransform& transform); - boost::optional removeWater(const osg::Vec2i& cellPosition); + std::optional removeWater(const osg::Vec2i& cellPosition); std::shared_ptr getMesh(const TilePosition& tilePosition); @@ -103,7 +103,7 @@ namespace DetourNavigator bool updateTile(const ObjectId id, const btTransform& transform, const AreaType areaType, const TilePosition& tilePosition, std::map& tiles); - boost::optional removeTile(const ObjectId id, const TilePosition& tilePosition, + std::optional removeTile(const ObjectId id, const TilePosition& tilePosition, std::map& tiles); }; } From f6bead88a989a617eb7dccd52d53e7c93fbd81a2 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 25 Oct 2020 00:58:44 +0200 Subject: [PATCH 2/4] purge boost/optional.hpp headers --- apps/openmw/mwsound/regionsoundselector.hpp | 3 +-- apps/openmw_test_suite/detournavigator/navigator.cpp | 3 --- components/detournavigator/asyncnavmeshupdater.hpp | 2 -- components/detournavigator/cachedrecastmeshmanager.hpp | 2 -- components/detournavigator/findrandompointaroundcircle.hpp | 3 +-- components/detournavigator/findsmoothpath.hpp | 2 -- components/detournavigator/recastmeshmanager.hpp | 2 -- components/detournavigator/settings.hpp | 5 ++--- 8 files changed, 4 insertions(+), 18 deletions(-) diff --git a/apps/openmw/mwsound/regionsoundselector.hpp b/apps/openmw/mwsound/regionsoundselector.hpp index 0dce5a7aa1..ede42c2946 100644 --- a/apps/openmw/mwsound/regionsoundselector.hpp +++ b/apps/openmw/mwsound/regionsoundselector.hpp @@ -1,8 +1,7 @@ #ifndef GAME_SOUND_REGIONSOUNDSELECTOR_H #define GAME_SOUND_REGIONSOUNDSELECTOR_H -#include - +#include #include namespace MWBase diff --git a/apps/openmw_test_suite/detournavigator/navigator.cpp b/apps/openmw_test_suite/detournavigator/navigator.cpp index 5a92d5d28a..ae345d187f 100644 --- a/apps/openmw_test_suite/detournavigator/navigator.cpp +++ b/apps/openmw_test_suite/detournavigator/navigator.cpp @@ -8,12 +8,9 @@ #include #include -#include - #include #include -#include #include MATCHER_P3(Vec3fEq, x, y, z, "") diff --git a/components/detournavigator/asyncnavmeshupdater.hpp b/components/detournavigator/asyncnavmeshupdater.hpp index fcdc0f21af..53e7fd7c14 100644 --- a/components/detournavigator/asyncnavmeshupdater.hpp +++ b/components/detournavigator/asyncnavmeshupdater.hpp @@ -9,8 +9,6 @@ #include -#include - #include #include #include diff --git a/components/detournavigator/cachedrecastmeshmanager.hpp b/components/detournavigator/cachedrecastmeshmanager.hpp index 8ce2e48c21..54574aa99d 100644 --- a/components/detournavigator/cachedrecastmeshmanager.hpp +++ b/components/detournavigator/cachedrecastmeshmanager.hpp @@ -3,8 +3,6 @@ #include "recastmeshmanager.hpp" -#include - namespace DetourNavigator { class CachedRecastMeshManager diff --git a/components/detournavigator/findrandompointaroundcircle.hpp b/components/detournavigator/findrandompointaroundcircle.hpp index fb0b5c5ba4..d0dc2bbbc0 100644 --- a/components/detournavigator/findrandompointaroundcircle.hpp +++ b/components/detournavigator/findrandompointaroundcircle.hpp @@ -3,8 +3,7 @@ #include "flags.hpp" -#include - +#include #include class dtNavMesh; diff --git a/components/detournavigator/findsmoothpath.hpp b/components/detournavigator/findsmoothpath.hpp index 23609ab097..2fc39d63fb 100644 --- a/components/detournavigator/findsmoothpath.hpp +++ b/components/detournavigator/findsmoothpath.hpp @@ -18,8 +18,6 @@ #include -#include - #include #include diff --git a/components/detournavigator/recastmeshmanager.hpp b/components/detournavigator/recastmeshmanager.hpp index 47f5f51909..3e9b2b1c35 100644 --- a/components/detournavigator/recastmeshmanager.hpp +++ b/components/detournavigator/recastmeshmanager.hpp @@ -9,8 +9,6 @@ #include -#include - #include #include #include diff --git a/components/detournavigator/settings.hpp b/components/detournavigator/settings.hpp index 290e763a98..d73087b217 100644 --- a/components/detournavigator/settings.hpp +++ b/components/detournavigator/settings.hpp @@ -1,10 +1,9 @@ #ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SETTINGS_H #define OPENMW_COMPONENTS_DETOURNAVIGATOR_SETTINGS_H -#include - -#include #include +#include +#include namespace DetourNavigator { From 4a54d375cc5091ffbcfcd76aa6001638a964ed34 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 25 Oct 2020 01:31:05 +0200 Subject: [PATCH 3/4] add cassert for windows --- components/detournavigator/findsmoothpath.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/detournavigator/findsmoothpath.hpp b/components/detournavigator/findsmoothpath.hpp index 2fc39d63fb..dcdddce8a6 100644 --- a/components/detournavigator/findsmoothpath.hpp +++ b/components/detournavigator/findsmoothpath.hpp @@ -19,7 +19,7 @@ #include #include - +#include #include class dtNavMesh; From 0e0c091e15c4ae7156762645c90fd7181b8ef73d Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 25 Oct 2020 01:34:04 +0200 Subject: [PATCH 4/4] add more optionals and casserts for windows --- components/detournavigator/recastmeshbuilder.cpp | 1 + components/detournavigator/recastmeshmanager.hpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/detournavigator/recastmeshbuilder.cpp b/components/detournavigator/recastmeshbuilder.cpp index 59f60394d2..ee014b9328 100644 --- a/components/detournavigator/recastmeshbuilder.cpp +++ b/components/detournavigator/recastmeshbuilder.cpp @@ -17,6 +17,7 @@ #include #include +#include #include namespace DetourNavigator diff --git a/components/detournavigator/recastmeshmanager.hpp b/components/detournavigator/recastmeshmanager.hpp index 3e9b2b1c35..5b568e004c 100644 --- a/components/detournavigator/recastmeshmanager.hpp +++ b/components/detournavigator/recastmeshmanager.hpp @@ -9,9 +9,10 @@ #include -#include -#include #include +#include +#include +#include class btCollisionShape;