From 4d899ea46f8846ff3c0db4c006a1b1af807f3d2e Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 8 Aug 2020 17:26:35 -0400
Subject: [PATCH] Fix small conditional parentheses warning

---
 indra/newview/llagentcamera.cpp | 7 +++----
 indra/newview/llpanelobject.cpp | 4 +++-
 indra/newview/rlvhelper.cpp     | 2 +-
 indra/newview/rlvinventory.cpp  | 3 ++-
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index d9a710bdef3..6e2715d5c94 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2041,11 +2041,10 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
 		//     F     |      T       | skip av    => slam focus
 		//     F     |      F       | clamp focus then av
 		bool fCamAvDistClamped, fCamAvDistLocked = false; float nCamAvDistLimitMin, nCamAvDistLimitMax;
-		if (fCamAvDistClamped = RlvActions::getCameraAvatarDistanceLimits(nCamAvDistLimitMin, nCamAvDistLimitMax))
+		if ((fCamAvDistClamped = RlvActions::getCameraAvatarDistanceLimits(nCamAvDistLimitMin, nCamAvDistLimitMax)))
 			fCamAvDistLocked = nCamAvDistLimitMin == nCamAvDistLimitMax;
-		bool fCamOriginDistClamped, fCamOriginDistLocked = false; float nCamOriginDistLimitMin, nCamOriginDistLimitMax;
-		if (fCamOriginDistClamped = RlvActions::getCameraOriginDistanceLimits(nCamOriginDistLimitMin, nCamOriginDistLimitMax))
-			fCamOriginDistLocked = nCamOriginDistLimitMin == nCamOriginDistLimitMax;
+		float nCamOriginDistLimitMin, nCamOriginDistLimitMax;
+		bool fCamOriginDistClamped = RlvActions::getCameraOriginDistanceLimits(nCamOriginDistLimitMin, nCamOriginDistLimitMax);
 
 		// Check focus distance limits
 		if ( (fCamOriginDistClamped) && (!fCamAvDistLocked) )
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 4abad8dda2d..0e8ab931275 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -360,7 +360,9 @@ void LLPanelObject::getState( )
 	if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
 	{
 		if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == objectp->getRootEdit()) )
-			enable_move = enable_scale = enable_rotate = FALSE;
+			enable_move = FALSE;
+			enable_scale = FALSE;
+			enable_rotate = FALSE;
 	}
 // [/RLVa:KB]
 
diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp
index 3f4c2f3e505..a4fd04acac3 100644
--- a/indra/newview/rlvhelper.cpp
+++ b/indra/newview/rlvhelper.cpp
@@ -615,7 +615,7 @@ bool RlvBehaviourModifier::convertOptionValue(const std::string& optionValue, Rl
 RlvCommand::RlvCommand(const LLUUID& idObj, const std::string& strCommand)
 	: m_fValid(false), m_idObj(idObj), m_pBhvrInfo(NULL), m_eParamType(RLV_TYPE_UNKNOWN), m_fStrict(false), m_fRefCounted(false)
 {
-	if (m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam))
+	if ((m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam)))
 	{
 		S32 nTemp = 0;
 		if ( ("n" == m_strParam) || ("add" == m_strParam) )
diff --git a/indra/newview/rlvinventory.cpp b/indra/newview/rlvinventory.cpp
index e3d06e2bdc6..c0259af3d4b 100644
--- a/indra/newview/rlvinventory.cpp
+++ b/indra/newview/rlvinventory.cpp
@@ -670,7 +670,8 @@ void RlvGiveToRLVTaskOffer::doneIdle()
 
 void RlvGiveToRLVTaskOffer::onDestinationCreated(const LLUUID& idDestFolder, const std::string& strName)
 {
-	if (const LLViewerInventoryCategory* pTarget = (idDestFolder.notNull()) ? gInventory.getCategory(idDestFolder) : nullptr)
+	const LLViewerInventoryCategory* pTarget = (idDestFolder.notNull()) ? gInventory.getCategory(idDestFolder) : nullptr;
+	if (pTarget)
 	{
 		moveAndRename(m_Folders.front(), idDestFolder, strName, new LLBoostFuncInventoryCallback(boost::bind(&RlvGiveToRLVTaskOffer::onOfferCompleted, this, _1)));
 	}
-- 
GitLab