From 24cf1a475ab3f8d1a44163d0824f230ead72844e Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 15 Feb 2012 11:00:32 -0800
Subject: [PATCH] fixed bad idiom of using statements in a ternary operator

---
 indra/newview/llinventoryfilter.cpp | 30 +++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 4971ded6345..21d309707af 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -539,8 +539,14 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
 		setModified();
 	}
 
-	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
-			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	if (areDateLimitsSet())
+	{
+		mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+	}
+	else
+	{
+		mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	}
 }
 
 void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
@@ -556,8 +562,14 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
 		setModified();
 	}
 
-	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
-			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	if (areDateLimitsSet())
+	{
+		mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+	}
+	else
+	{
+		mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	}
 }
 
 BOOL LLInventoryFilter::isSinceLogoff() const
@@ -603,8 +615,14 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
 		}
 	}
 
-	areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE
-			: mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	if (areDateLimitsSet())
+	{
+		mFilterOps.mFilterTypes |= FILTERTYPE_DATE;
+	}
+	else
+	{
+		mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE;
+	}
 }
 
 void LLInventoryFilter::setFilterLinks(U64 filter_links)
-- 
GitLab