summaryrefslogtreecommitdiff
path: root/indra/newview/lltracker.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-12-20 09:44:10 -0500
committerNat Goodspeed <nat@lindenlab.com>2016-12-20 09:44:10 -0500
commit573287b50f5005a279ea1ec42c4ddc18bd9c996b (patch)
tree5a06bf7d13e586e5159b74e18b37aca981a1a44a /indra/newview/lltracker.cpp
parent2499f6bcff53812d1d8bd1a73d657ef1861d7482 (diff)
DRTVWR-418: Fix API for LLTracker::stopTracking().
The signature for LLTracker::stopTracking() was silly: it accepted a void* for the sole purpose of testing whether it was NULL. In other words, the parameter was really a bool in void* clothing. Most callers passed NULL. What got ugly was when you wanted to pass 'true', or a variable bool value. Such values had to be cast to void*. In 64-bit land, the compiler correctly flags that as extremely dubious practice. But it's entirely unnecessary. Since stopTracking() wants a bool, change its parameter to bool. Everybody wins. (While at it, change a few related method params from BOOL to builtin bool.)
Diffstat (limited to 'indra/newview/lltracker.cpp')
-rw-r--r--indra/newview/lltracker.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index b015cde45d..2ec5c41b88 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -100,9 +100,8 @@ LLTracker::~LLTracker()
// static
-void LLTracker::stopTracking(void* userdata)
+void LLTracker::stopTracking(bool clear_ui)
{
- BOOL clear_ui = ((BOOL)(intptr_t)userdata);
instance()->stopTrackingAll(clear_ui);
}
@@ -183,7 +182,7 @@ void LLTracker::render3D()
F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f);
if (dist < DESTINATION_REACHED_RADIUS)
{
- instance()->stopTrackingLocation(FALSE,TRUE);
+ instance()->stopTrackingLocation(false,true);
}
else
{
@@ -606,7 +605,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
}
-void LLTracker::stopTrackingAll(BOOL clear_ui)
+void LLTracker::stopTrackingAll(bool clear_ui)
{
switch (mTrackingStatus)
{
@@ -626,7 +625,7 @@ void LLTracker::stopTrackingAll(BOOL clear_ui)
}
-void LLTracker::stopTrackingAvatar(BOOL clear_ui)
+void LLTracker::stopTrackingAvatar(bool clear_ui)
{
LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
if( !av_tracker.getAvatarID().isNull() )
@@ -640,7 +639,7 @@ void LLTracker::stopTrackingAvatar(BOOL clear_ui)
}
-void LLTracker::stopTrackingLandmark(BOOL clear_ui)
+void LLTracker::stopTrackingLandmark(bool clear_ui)
{
purgeBeaconText();
mTrackedLandmarkAssetID.setNull();
@@ -655,7 +654,7 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui)
}
-void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached)
+void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached)
{
purgeBeaconText();
mTrackedLocationName.assign("");