From 96392be9857417e06295d0bb0e1b39b3cbb0249c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 8 Dec 2021 20:49:14 -0500
Subject: [PATCH] Clean up useless instance calls to static LLUICtrlFactory
 functions

---
 indra/llui/lllineeditor.cpp            | 2 +-
 indra/llui/lltexteditor.cpp            | 2 +-
 indra/llui/lltoolbar.cpp               | 2 +-
 indra/llui/lltooltip.cpp               | 2 +-
 indra/newview/llappviewer.cpp          | 4 ++--
 indra/newview/llfloaterimcontainer.cpp | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index d549fb4d885..07b735a1bb0 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -2650,7 +2650,7 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
 	if (!menu)
 	{
 		llassert(LLMenuGL::sMenuContainer != NULL);
-		menu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>
+		menu = LLUICtrlFactory::createFromFile<LLContextMenu>
 			("menu_text_editor.xml",
 				LLMenuGL::sMenuContainer,
 				LLMenuHolderGL::child_registry_t::instance());
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 47ac28baba2..c03a646b223 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2169,7 +2169,7 @@ void LLTextEditor::showContextMenu(S32 x, S32 y)
 	if (!menu)
 	{
 		llassert(LLMenuGL::sMenuContainer != NULL);
-		menu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>("menu_text_editor.xml", 
+		menu = LLUICtrlFactory::createFromFile<LLContextMenu>("menu_text_editor.xml", 
 																				LLMenuGL::sMenuContainer, 
 																				LLMenuHolderGL::child_registry_t::instance());
         if(!menu)
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 4772079acab..d8af0a62874 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -176,7 +176,7 @@ void LLToolBar::createContextMenu()
 		
 		// Create the context menu
 		llassert(LLMenuGL::sMenuContainer != NULL);
-		LLContextMenu* menu = LLUICtrlFactory::instanceFast().createFromFile<LLContextMenu>("menu_toolbars.xml", LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instanceFast());
+		LLContextMenu* menu = LLUICtrlFactory::createFromFile<LLContextMenu>("menu_toolbars.xml", LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instanceFast());
 
 		if (menu)
 		{
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 12e64809de1..73a379cca04 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -487,7 +487,7 @@ void LLToolTipMgr::show(const LLToolTip::Params& params)
 
 	// fill in default tooltip params from tool_tip.xml
 	LLToolTip::Params params_with_defaults(params);
-	params_with_defaults.fillFrom(LLUICtrlFactory::instanceFast().getDefaultParams<LLToolTip>());
+	params_with_defaults.fillFrom(LLUICtrlFactory::getDefaultParams<LLToolTip>());
 	if (!params_with_defaults.validateBlock()) 
 	{
 		LL_WARNS() << "Could not display tooltip!" << LL_ENDL;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 39a9080a64a..29e04e5d8c8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -544,7 +544,7 @@ bool	create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
 		icon_params.group_id = match_id;
 		icon_params.rect = LLRect(0, 16, 16, 0);
 		icon_params.visible = true;
-		icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params);
+		icon = LLUICtrlFactory::create<LLGroupIconCtrl>(icon_params);
 	}
 	else
 	{
@@ -552,7 +552,7 @@ bool	create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
 		icon_params.avatar_id = match_id;
 		icon_params.rect = LLRect(0, 16, 16, 0);
 		icon_params.visible = true;
-		icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params);
+		icon = LLUICtrlFactory::create<LLAvatarIconCtrl>(icon_params);
 	}
 
 	LLInlineViewSegment::Params params;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 597f8ba9f50..18cd4f6770d 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -322,7 +322,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
 	{
 		LLGroupIconCtrl::Params icon_params;
 		icon_params.group_id = session_id;
-		icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params);
+		icon = LLUICtrlFactory::create<LLGroupIconCtrl>(icon_params);
 		icon_id = session_id;
 
 		mSessions[session_id] = floaterp;
@@ -334,7 +334,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp,
 
 		LLAvatarIconCtrl::Params icon_params;
 		icon_params.avatar_id = avatar_id;
-		icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params);
+		icon = LLUICtrlFactory::create<LLAvatarIconCtrl>(icon_params);
 		icon_id = avatar_id;
 
 		mSessions[session_id] = floaterp;
-- 
GitLab