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
0.6.0-stable
Dr Scofield 2008-07-18 10:33:10 +00:00
parent 473059905f
commit 3fb0a08619
1 changed files with 20 additions and 20 deletions

View File

@ -36,7 +36,7 @@ namespace OpenSim.Framework
{ {
public class EstateSettings 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; private ConfigurationMember configMember;
public delegate void SaveDelegate(EstateSettings rs); public delegate void SaveDelegate(EstateSettings rs);
@ -268,21 +268,21 @@ namespace OpenSim.Framework
public void Save() public void Save()
{ {
if(OnSave != null) if (OnSave != null)
OnSave(this); OnSave(this);
} }
public void AddEstateManager(LLUUID avatarID) public void AddEstateManager(LLUUID avatarID)
{ {
if(avatarID == null || avatarID == LLUUID.Zero) if (avatarID == LLUUID.Zero)
return; return;
if(!l_EstateManagers.Contains(avatarID)) if (!l_EstateManagers.Contains(avatarID))
l_EstateManagers.Add(avatarID); l_EstateManagers.Add(avatarID);
} }
public void RemoveEstateManager(LLUUID avatarID) public void RemoveEstateManager(LLUUID avatarID)
{ {
if(l_EstateManagers.Contains(avatarID)) if (l_EstateManagers.Contains(avatarID))
l_EstateManagers.Remove(avatarID); l_EstateManagers.Remove(avatarID);
} }
@ -294,16 +294,16 @@ namespace OpenSim.Framework
public bool IsBanned(LLUUID avatarID) public bool IsBanned(LLUUID avatarID)
{ {
foreach (EstateBan ban in l_EstateBans) foreach (EstateBan ban in l_EstateBans)
if(ban.bannedUUID == avatarID) if (ban.bannedUUID == avatarID)
return true; return true;
return false; return false;
} }
public void AddBan(EstateBan ban) public void AddBan(EstateBan ban)
{ {
if(ban == null) if (ban == null)
return; return;
if(!IsBanned(ban.bannedUUID)) if (!IsBanned(ban.bannedUUID))
l_EstateBans.Add(ban); l_EstateBans.Add(ban);
} }
@ -315,7 +315,7 @@ namespace OpenSim.Framework
public void RemoveBan(LLUUID avatarID) public void RemoveBan(LLUUID avatarID)
{ {
foreach (EstateBan ban in new List<EstateBan>(l_EstateBans)) foreach (EstateBan ban in new List<EstateBan>(l_EstateBans))
if(ban.bannedUUID == avatarID) if (ban.bannedUUID == avatarID)
l_EstateBans.Remove(ban); l_EstateBans.Remove(ban);
} }
@ -400,27 +400,27 @@ namespace OpenSim.Framework
{ {
case "region_flags": case "region_flags":
Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)configuration_result; 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; m_AllowVoice = true;
if((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0) if ((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0)
m_AllowDirectTeleport = true; m_AllowDirectTeleport = true;
if((flags & Simulator.RegionFlags.DenyAnonymous) != 0) if ((flags & Simulator.RegionFlags.DenyAnonymous) != 0)
m_DenyAnonymous = true; m_DenyAnonymous = true;
if((flags & Simulator.RegionFlags.DenyIdentified) != 0) if ((flags & Simulator.RegionFlags.DenyIdentified) != 0)
m_DenyIdentified = true; m_DenyIdentified = true;
if((flags & Simulator.RegionFlags.DenyTransacted) != 0) if ((flags & Simulator.RegionFlags.DenyTransacted) != 0)
m_DenyTransacted = true; m_DenyTransacted = true;
if((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0) if ((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0)
m_AbuseEmailToEstateOwner = true; m_AbuseEmailToEstateOwner = true;
if((flags & Simulator.RegionFlags.BlockDwell) != 0) if ((flags & Simulator.RegionFlags.BlockDwell) != 0)
m_BlockDwell = true; m_BlockDwell = true;
if((flags & Simulator.RegionFlags.EstateSkipScripts) != 0) if ((flags & Simulator.RegionFlags.EstateSkipScripts) != 0)
m_EstateSkipScripts = true; m_EstateSkipScripts = true;
if((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0) if ((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0)
m_ResetHomeOnTeleport = true; m_ResetHomeOnTeleport = true;
if((flags & Simulator.RegionFlags.TaxFree) != 0) if ((flags & Simulator.RegionFlags.TaxFree) != 0)
m_TaxFree = true; m_TaxFree = true;
if((flags & Simulator.RegionFlags.PublicAllowed) != 0) if ((flags & Simulator.RegionFlags.PublicAllowed) != 0)
m_PublicAccess = true; m_PublicAccess = true;
break; break;
case "billable_factor": case "billable_factor":