From abdb10359f3fcb3efed7b4cc2538b92117bdaaf3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 27 Apr 2022 17:47:22 -0400
Subject: [PATCH] More shared_ptr conversion

---
 indra/newview/llsculptidsize.cpp |  2 +-
 indra/newview/llsculptidsize.h   |  2 +-
 indra/newview/llvoicevivox.cpp   |  2 +-
 indra/newview/llvoicevivox.h     | 16 +++++++++-------
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp
index 96dc279b7b5..1a20016427d 100644
--- a/indra/newview/llsculptidsize.cpp
+++ b/indra/newview/llsculptidsize.cpp
@@ -65,7 +65,7 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz)
 	if (itLU.first == itLU.second)
 	{ //register
 		llassert(mSizeInfo.get<tag_BY_DRAWABLE>().end() == mSizeInfo.get<tag_BY_DRAWABLE>().find(pdrawable));
-		mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, boost::make_shared<SizeSum>(sz), sculptId));
+		mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, std::make_shared<SizeSum>(sz), sculptId));
 		total_size = sz;
 	}
 	else
diff --git a/indra/newview/llsculptidsize.h b/indra/newview/llsculptidsize.h
index 87ee417b867..679fcbd44c0 100644
--- a/indra/newview/llsculptidsize.h
+++ b/indra/newview/llsculptidsize.h
@@ -52,7 +52,7 @@ class LLSculptIDSize
 
 	struct Info
 	{
-		typedef boost::shared_ptr<SizeSum> PtrSizeSum;
+		typedef std::shared_ptr<SizeSum> PtrSizeSum;
 
 		Info(const LLDrawable *drawable, int size, PtrSizeSum sizeInfo, LLUUID sculptId)
 			: mDrawable(drawable)
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index b897c30ac62..8c9608c7998 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -5922,7 +5922,7 @@ void LLVivoxVoiceClient::filePlaybackSetMode(bool vox, float speed)
 }
 
 //------------------------------------------------------------------------
-std::set<LLVivoxVoiceClient::sessionState::wptr_t> LLVivoxVoiceClient::sessionState::mSession;
+LLVivoxVoiceClient::sessionState::session_wptr_set LLVivoxVoiceClient::sessionState::mSession;
 
 
 LLVivoxVoiceClient::sessionState::sessionState() :
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 33a672ca169..214527748a8 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -296,8 +296,8 @@ class LLVivoxVoiceClient final : public LLSingleton<LLVivoxVoiceClient>,
 		bool mAvatarIDValid;
 		bool mIsSelf;
 	};
-    typedef boost::shared_ptr<participantState> participantStatePtr_t;
-    typedef boost::weak_ptr<participantState> participantStateWptr_t;
+    typedef std::shared_ptr<participantState> participantStatePtr_t;
+    typedef std::weak_ptr<participantState> participantStateWptr_t;
 
     typedef std::map<const std::string, participantStatePtr_t> participantMap;
     typedef std::map<const LLUUID, participantStatePtr_t> participantUUIDMap;
@@ -305,8 +305,10 @@ class LLVivoxVoiceClient final : public LLSingleton<LLVivoxVoiceClient>,
 	struct sessionState
 	{
     public:
-        typedef boost::shared_ptr<sessionState> ptr_t;
-        typedef boost::weak_ptr<sessionState> wptr_t;
+        typedef std::shared_ptr<sessionState> ptr_t;
+        typedef std::weak_ptr<sessionState> wptr_t;
+
+		using session_wptr_set = std::set<wptr_t, std::owner_less<wptr_t>>;
 
         typedef boost::function<void(const ptr_t &)> sessionFunc_t;
 
@@ -372,8 +374,8 @@ class LLVivoxVoiceClient final : public LLSingleton<LLVivoxVoiceClient>,
     private:
         sessionState();
 
-        static std::set<wptr_t> mSession;   // canonical list of outstanding sessions.
-        std::set<wptr_t>::iterator  mMyIterator;    // used for delete
+        static session_wptr_set mSession;   // canonical list of outstanding sessions.
+		session_wptr_set::iterator  mMyIterator;    // used for delete
 
         static void for_eachPredicate(const wptr_t &a, sessionFunc_t func);
 
@@ -383,7 +385,7 @@ class LLVivoxVoiceClient final : public LLSingleton<LLVivoxVoiceClient>,
         static bool testByCallerId(const LLVivoxVoiceClient::sessionState::wptr_t &a, LLUUID participantId);
 
 	};
-    typedef boost::shared_ptr<sessionState> sessionStatePtr_t;
+    typedef std::shared_ptr<sessionState> sessionStatePtr_t;
 
     typedef std::map<std::string, sessionStatePtr_t> sessionMap;
 	
-- 
GitLab