From c9920bc65372a0aaacec8d215a481f04045b2fb4 Mon Sep 17 00:00:00 2001 From: Cinder <cinder@sdf.org> Date: Mon, 26 Jan 2015 22:09:01 -0700 Subject: [PATCH] pos_map_t --- indra/newview/llavataractions.cpp | 4 ++-- indra/newview/llavatarlist.cpp | 4 ++-- indra/newview/llfloaterimcontainer.cpp | 2 +- indra/newview/llnetmap.cpp | 2 +- indra/newview/lltoolgun.cpp | 2 +- indra/newview/llworld.cpp | 2 +- indra/newview/llworld.h | 3 ++- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 635cedfb91..fd71122d7d 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -1339,7 +1339,7 @@ void LLAvatarActions::teleportTo(const LLUUID& avatar_id) if (avatar_id.isNull()) return; - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), 4096.f); auto iter = positions.find(avatar_id); if (iter != positions.cend()) @@ -1359,7 +1359,7 @@ bool LLAvatarActions::canTeleportTo(const LLUUID& avatar_id) if (avatar_id.isNull()) return false; - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), 4096.f); auto iter = positions.find(avatar_id); if (iter != positions.cend()) diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 2b105f2a7e..927bfac62c 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -598,9 +598,9 @@ void LLAvatarList::updateDistances() LLAvatarListItem* item = static_cast<LLAvatarListItem*>(*it); if (item->getAvatarId() == gAgentID) continue; - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); - boost::unordered_map<LLUUID, LLVector3d>::iterator iter = positions.find(item->getAvatarId()); + LLWorld::pos_map_t::iterator iter = positions.find(item->getAvatarId()); if (iter != positions.end()) item->setDistance((iter->second - gAgent.getPositionGlobal()).magVec()); else diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index b31d71eeb0..c816333308 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1651,7 +1651,7 @@ void LLFloaterIMContainer::setNearbyDistances() if (item) { // Get the positions of the nearby avatars and their ids - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), 110.f); // Get the position of the agent const LLVector3d& me_pos = gAgent.getPositionGlobal(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index eb9973eecc..35726f4914 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -382,7 +382,7 @@ void LLNetMap::draw() F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE); LLVector3 pos_map; - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; bool unknown_relative_z; LLColor4 color; diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index ce5fcf2a72..0a42f96448 100755 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -155,7 +155,7 @@ void LLToolGun::draw() LLQuaternion myRotation = LLViewerCamera::getInstance()->getQuaternion(); myRotation.set(-myRotation.mQ[VX], -myRotation.mQ[VY], -myRotation.mQ[VZ], myRotation.mQ[VW]); - boost::unordered_map<LLUUID, LLVector3d> positions; + LLWorld::pos_map_t positions; LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), iff_range); for (auto iter = positions.cbegin(), iter_end = positions.cend(); iter != iter_end; ++iter) { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 51d23351e9..433567b44d 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1334,7 +1334,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi } } -void LLWorld::getAvatars(boost::unordered_map<LLUUID, LLVector3d>* umap, const LLVector3d& relative_to, F32 radius) const +void LLWorld::getAvatars(pos_map_t* umap, const LLVector3d& relative_to, F32 radius) const { F32 radius_squared = radius * radius; diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index af20e280bf..8fc59a1db9 100755 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -163,7 +163,8 @@ public: std::vector<LLVector3d>* positions = NULL, const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const; - void getAvatars(boost::unordered_map<LLUUID, LLVector3d>* map = NULL, + typedef boost::unordered_map<LLUUID, LLVector3d> pos_map_t; + void getAvatars(pos_map_t* map = NULL, const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const; -- GitLab