From a183fb9f5efd5c49a0da7442dd8b7202db6167e7 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 15 Dec 2009 19:48:02 -0800
Subject: [PATCH] fix for gcc build

---
 indra/llui/lluictrlfactory.cpp | 1 +
 indra/llui/lluictrlfactory.h   | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 625d3c63e56..40b22f515a5 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -396,6 +396,7 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na
 //static
 void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group)
 {
+	if (tab_group == S32_MAX) tab_group = parent->getLastTabGroup();
 	parent->addChild(view, tab_group);
 }
 
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 6dab9521bb6..9d26a9c9ef8 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -201,7 +201,7 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 
 		if (parent)
 		{
-			S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : parent->getLastTabGroup();
+			S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : S32_MAX;
 			setCtrlParent(widget, parent, tab_group);
 		}
 		return widget;
@@ -311,7 +311,8 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 
 		T* widget = createWidget<T>(params, parent);
 
-		createChildren(widget, node, typename T::child_registry_t::instance(), output_node);
+		typedef typename T::child_registry_t registry_t;
+		createChildren(widget, node, registry_t::instance(), output_node);
 
 		if (widget && !widget->postBuild())
 		{
-- 
GitLab