From 37f3a016fcc8b1cf92cdb4c546b1ab25546a527a Mon Sep 17 00:00:00 2001
From: Todd Stinson <stinson@lindenlab.com>
Date: Tue, 19 Jun 2012 18:29:49 -0700
Subject: [PATCH] Removing unused methods and members from the pathfinding
 manager.

---
 indra/newview/llpathfindingmanager.cpp | 74 +-------------------------
 indra/newview/llpathfindingmanager.h   |  9 +---
 2 files changed, 3 insertions(+), 80 deletions(-)

diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 6dffe2f4592..912b264c411 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -286,26 +286,10 @@ class CharactersResponder : public LLHTTPClient::Responder
 LLPathfindingManager::LLPathfindingManager()
 	: LLSingleton<LLPathfindingManager>(),
 	mNavMeshMap(),
-	mCrossingSlot(),
-	mAgentStateSignal(),
-	mNavMeshSlot()
+	mAgentStateSignal()
 {
 }
 
-void LLPathfindingManager::onRegionBoundaryCrossed()
-{ 
-	if (mNavMeshSlot.connected())
-	{
-		mNavMeshSlot.disconnect();
-	}
-	LLViewerRegion *currentRegion = getCurrentRegion();
-	if (currentRegion != NULL)
-	{
-		mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
-		requestGetNavMeshForRegion(currentRegion, true);
-	}
-}
-
 LLPathfindingManager::~LLPathfindingManager()
 {	
 	quitSystem();
@@ -317,36 +301,10 @@ void LLPathfindingManager::initSystem()
 	{
 		LLPathingLib::initSystem();
 	}
-
-	if ( !mCrossingSlot.connected() )
-	{
-		mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this));
-	}
-
-	if (mNavMeshSlot.connected())
-	{
-		mNavMeshSlot.disconnect();
-	}
-	LLViewerRegion *currentRegion = getCurrentRegion();
-	if (currentRegion != NULL)
-	{
-		mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));
-		requestGetNavMeshForRegion(currentRegion, true);
-	}
 }
 
 void LLPathfindingManager::quitSystem()
 {
-	if (mNavMeshSlot.connected())
-	{
-		mNavMeshSlot.disconnect();
-	}
-
-	if (mCrossingSlot.connected())
-	{
-		mCrossingSlot.disconnect();
-	}
-
 	if (LLPathingLib::getInstance() != NULL)
 	{
 		LLPathingLib::quitSystem();
@@ -741,36 +699,6 @@ LLViewerRegion *LLPathfindingManager::getCurrentRegion() const
 	return gAgent.getRegion();
 }
 
-void LLPathfindingManager::handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus)
-{
-	if (!pNavMeshStatus.isValid())
-	{
-		llinfos << "STINSON DEBUG: navmesh status is invalid" << llendl;
-	}
-	else
-	{
-		switch (pNavMeshStatus.getStatus())
-		{
-		case LLPathfindingNavMeshStatus::kPending : 
-			llinfos << "STINSON DEBUG: navmesh status is kPending" << llendl;
-			break;
-		case LLPathfindingNavMeshStatus::kBuilding : 
-			llinfos << "STINSON DEBUG: navmesh status is kBuilding" << llendl;
-			break;
-		case LLPathfindingNavMeshStatus::kComplete : 
-			llinfos << "STINSON DEBUG: navmesh status is kComplete" << llendl;
-			break;
-		case LLPathfindingNavMeshStatus::kRepending : 
-			llinfos << "STINSON DEBUG: navmesh status is kRepending" << llendl;
-			break;
-		default : 
-			llinfos << "STINSON DEBUG: navmesh status is default" << llendl;
-			llassert(0);
-			break;
-		}
-	}
-}
-
 #if 0
 void LLPathfindingManager::displayNavMeshRebakePanel()
 {
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 21467a0cf82..2457c183097 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -95,7 +95,6 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
 	void handleNavMeshRebakeResult( const LLSD &pContent );
 	void handleNavMeshRebakeError( U32 pStatus, const std::string &pReason, const std::string &pURL );
 	void triggerNavMeshRebuild();
-	void onRegionBoundaryCrossed();
 	void requestGetAgentState();	
 
 protected:
@@ -125,8 +124,6 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
 	std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const;
 	LLViewerRegion *getCurrentRegion() const;
 
-	void handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus);
-
 #if 0
 	void displayNavMeshRebakePanel();
 	void hideNavMeshRebakePanel();	
@@ -134,10 +131,8 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
 	void handleAgentStateResult(const LLSD &pContent );
 	void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL);
 
-	NavMeshMap                           mNavMeshMap;
-	agent_state_slot_t                   mCrossingSlot;
-	agent_state_signal_t                 mAgentStateSignal;
-	LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
+	NavMeshMap           mNavMeshMap;
+	agent_state_signal_t mAgentStateSignal;
 };
 
 
-- 
GitLab