diff options
author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-15 10:22:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 10:22:29 +0200 |
commit | 202fd41389973322f63186fd8e5a368fce3e1b04 (patch) | |
tree | 61650c3cf7ec62a142b250a59562063c7ef1d8a5 /src/common/Collision | |
parent | ce1e2c0f9b4f80e1fa5c448ee12fec43204a3634 (diff) |
Core/Misc: Replace boost::optional with std::optional (#25047)
C++17 is already mandatory, so it's a safe thing to do
Diffstat (limited to 'src/common/Collision')
-rw-r--r-- | src/common/Collision/DynamicTree.cpp | 4 | ||||
-rw-r--r-- | src/common/Collision/Management/VMapManager2.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp index bfe33c9eae7..35047464231 100644 --- a/src/common/Collision/DynamicTree.cpp +++ b/src/common/Collision/DynamicTree.cpp @@ -318,9 +318,9 @@ void DynamicMapTree::getAreaAndLiquidData(float x, float y, float z, uint32 phas float liquidLevel; if (!reqLiquidType || (dynamic_cast<VMAP::VMapManager2*>(VMAP::VMapFactory::createOrGetVMapManager())->GetLiquidFlagsPtr(liquidType) & reqLiquidType)) if (intersectionCallBack.GetHitModel()->GetLiquidLevel(v, intersectionCallBack.GetLocationInfo(), liquidLevel)) - data.liquidInfo = boost::in_place(liquidType, liquidLevel); + data.liquidInfo.emplace(liquidType, liquidLevel); - data.areaInfo = boost::in_place(0, + data.areaInfo.emplace(0, intersectionCallBack.GetLocationInfo().rootId, intersectionCallBack.GetLocationInfo().hitModel->GetWmoID(), intersectionCallBack.GetLocationInfo().hitModel->GetMogpFlags()); diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp index 76ba7e7aeb7..04b0900a6b3 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager2.cpp @@ -287,7 +287,7 @@ namespace VMAP int32 adtId, rootId, groupId; uint32 flags; if (getAreaInfo(mapId, x, y, data.floorZ, flags, adtId, rootId, groupId)) - data.areaInfo = boost::in_place(adtId, rootId, groupId, flags); + data.areaInfo.emplace(adtId, rootId, groupId, flags); return; } InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId); @@ -304,10 +304,10 @@ namespace VMAP float liquidLevel; if (!reqLiquidType || (GetLiquidFlagsPtr(liquidType) & reqLiquidType)) if (info.hitInstance->GetLiquidLevel(pos, info, liquidLevel)) - data.liquidInfo = boost::in_place(liquidType, liquidLevel); + data.liquidInfo.emplace(liquidType, liquidLevel); if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG)) - data.areaInfo = boost::in_place(info.hitInstance->adtId, info.rootId, info.hitModel->GetWmoID(), info.hitModel->GetMogpFlags()); + data.areaInfo.emplace(info.hitInstance->adtId, info.rootId, info.hitModel->GetWmoID(), info.hitModel->GetMogpFlags()); } } } |