summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorRicky Curtice <kf6kjg+hg@gmail.com>2011-03-12 23:39:10 -0800
committerRicky Curtice <kf6kjg+hg@gmail.com>2011-03-12 23:39:10 -0800
commit9bac314ba0d8b6bd35c8d2e27ce99a28b924dea6 (patch)
tree313a2608ab5049ac26bc81f0110e47324c8146fb /indra/newview/llpanelpeople.cpp
parentd4d292258e31eee6d639106147758f39deae63e3 (diff)
Switched to using *_SQUARED constants instead of multiplied constants, and cleaned up a few other minor issues noted during review.
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index dbfdf0bdf6..e3a7b749ea 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -158,9 +158,8 @@ protected:
const LLVector3d& me_pos = gAgent.getPositionGlobal();
const LLVector3d& item1_pos = mAvatarsPositions.find(item1->getAvatarId())->second;
const LLVector3d& item2_pos = mAvatarsPositions.find(item2->getAvatarId())->second;
- F32 dist1 = dist_vec_squared(item1_pos, me_pos);
- F32 dist2 = dist_vec_squared(item2_pos, me_pos);
- return dist1 < dist2;
+
+ return dist_vec_squared(item1_pos, me_pos) < dist_vec_squared(item2_pos, me_pos);
}
private:
id_to_pos_map_t mAvatarsPositions;