From 573287b50f5005a279ea1ec42c4ddc18bd9c996b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:44:10 -0500 Subject: 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.) --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f472db080f..68d5e4ba2d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4196,7 +4196,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0); if (beacon_dir.magVecSquared() < 25.f) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero()) { -- cgit v1.2.3 From 65cf4912f6e566fdb3e6f835cc0f45dbb3351304 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 10:42:22 -0500 Subject: DRTVWR-418: Another fix for std::string::find() return type. --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 68d5e4ba2d..333b6703fe 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2596,7 +2596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // The group notice packet does not have an AgentID. Obtain one from the name cache. // If last name is "Resident" strip it out so the cache name lookup works. - U32 index = original_name.find(" Resident"); + std::string::size_type index = original_name.find(" Resident"); if (index != std::string::npos) { original_name = original_name.substr(0, index); -- cgit v1.2.3