From b0889ed92a3c7d152f9b05aec1ce00dfc010e34e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 12 Apr 2011 22:30:43 +0100
Subject: refactor: simplify bRayEndIsIntersection boolean set from
 RayEndIsIntersection byte

---
 .../Framework/InventoryAccess/InventoryAccessModule.cs    | 15 +--------------
 OpenSim/Region/Framework/Scenes/Scene.Inventory.cs        | 13 +------------
 2 files changed, 2 insertions(+), 26 deletions(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index cdee53c..73b0a35 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -574,21 +574,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
         {
 //            m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID);
             
-            // Work out position details
-            byte bRayEndIsIntersection = (byte)0;
-
-            if (RayEndIsIntersection)
-            {
-                bRayEndIsIntersection = (byte)1;
-            }
-            else
-            {
-                bRayEndIsIntersection = (byte)0;
-            }
-
+            byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
             Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
-
-
             Vector3 pos = m_Scene.GetNewRezLocation(
                       RayStart, RayEnd, RayTargetID, Quaternion.Identity,
                       BypassRayCast, bRayEndIsIntersection, true, scale, false);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 254879b..0f85925 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1989,18 +1989,7 @@ namespace OpenSim.Region.Framework.Scenes
                     return;
                 }                
                                
-                // Work out position details
-                byte bRayEndIsIntersection = (byte)0;
-    
-                if (RayEndIsIntersection)
-                {
-                    bRayEndIsIntersection = (byte)1;
-                }
-                else
-                {
-                    bRayEndIsIntersection = (byte)0;
-                }
-    
+                byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
                 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
                 Vector3 pos 
                     = GetNewRezLocation(
-- 
cgit v1.1