From 3fb0a08619ef53d38bc7e64a7587de5b51b9b692 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 18 Jul 2008 10:33:10 +0000 Subject: fixing warnings in EstateSettings and correcting coding style: * warning was: OpenSim/Framework/EstateSettings.cs(277): warning CS0472: The result of comparing `libsecondlife.LLUUID' against null is always `false'. This operation is undocumented and it is temporary supported for compatibility reasons only * coding style: space before flow control statements please! http://blogs.msdn.com/brada/articles/361363.aspx --- OpenSim/Framework/EstateSettings.cs | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index b48a1db..38c7bc3 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -36,7 +36,7 @@ namespace OpenSim.Framework { public class EstateSettings { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private ConfigurationMember configMember; public delegate void SaveDelegate(EstateSettings rs); @@ -268,21 +268,21 @@ namespace OpenSim.Framework public void Save() { - if(OnSave != null) + if (OnSave != null) OnSave(this); } public void AddEstateManager(LLUUID avatarID) { - if(avatarID == null || avatarID == LLUUID.Zero) + if (avatarID == LLUUID.Zero) return; - if(!l_EstateManagers.Contains(avatarID)) + if (!l_EstateManagers.Contains(avatarID)) l_EstateManagers.Add(avatarID); } public void RemoveEstateManager(LLUUID avatarID) { - if(l_EstateManagers.Contains(avatarID)) + if (l_EstateManagers.Contains(avatarID)) l_EstateManagers.Remove(avatarID); } @@ -294,16 +294,16 @@ namespace OpenSim.Framework public bool IsBanned(LLUUID avatarID) { foreach (EstateBan ban in l_EstateBans) - if(ban.bannedUUID == avatarID) + if (ban.bannedUUID == avatarID) return true; return false; } public void AddBan(EstateBan ban) { - if(ban == null) + if (ban == null) return; - if(!IsBanned(ban.bannedUUID)) + if (!IsBanned(ban.bannedUUID)) l_EstateBans.Add(ban); } @@ -315,7 +315,7 @@ namespace OpenSim.Framework public void RemoveBan(LLUUID avatarID) { foreach (EstateBan ban in new List(l_EstateBans)) - if(ban.bannedUUID == avatarID) + if (ban.bannedUUID == avatarID) l_EstateBans.Remove(ban); } @@ -400,27 +400,27 @@ namespace OpenSim.Framework { case "region_flags": Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)configuration_result; - if((flags & (Simulator.RegionFlags)(1<<29)) != 0) + if ((flags & (Simulator.RegionFlags)(1<<29)) != 0) m_AllowVoice = true; - if((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0) + if ((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0) m_AllowDirectTeleport = true; - if((flags & Simulator.RegionFlags.DenyAnonymous) != 0) + if ((flags & Simulator.RegionFlags.DenyAnonymous) != 0) m_DenyAnonymous = true; - if((flags & Simulator.RegionFlags.DenyIdentified) != 0) + if ((flags & Simulator.RegionFlags.DenyIdentified) != 0) m_DenyIdentified = true; - if((flags & Simulator.RegionFlags.DenyTransacted) != 0) + if ((flags & Simulator.RegionFlags.DenyTransacted) != 0) m_DenyTransacted = true; - if((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0) + if ((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0) m_AbuseEmailToEstateOwner = true; - if((flags & Simulator.RegionFlags.BlockDwell) != 0) + if ((flags & Simulator.RegionFlags.BlockDwell) != 0) m_BlockDwell = true; - if((flags & Simulator.RegionFlags.EstateSkipScripts) != 0) + if ((flags & Simulator.RegionFlags.EstateSkipScripts) != 0) m_EstateSkipScripts = true; - if((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0) + if ((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0) m_ResetHomeOnTeleport = true; - if((flags & Simulator.RegionFlags.TaxFree) != 0) + if ((flags & Simulator.RegionFlags.TaxFree) != 0) m_TaxFree = true; - if((flags & Simulator.RegionFlags.PublicAllowed) != 0) + if ((flags & Simulator.RegionFlags.PublicAllowed) != 0) m_PublicAccess = true; break; case "billable_factor": -- cgit v1.1