refactor: replace verbose checks with String.IsNullOrEmpty where applicable.

Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
This commit is contained in:
Justin Clark-Casey (justincc)
2013-11-15 21:45:08 +00:00
parent b4932bda2a
commit 7cab41f422
30 changed files with 46 additions and 47 deletions

View File

@@ -168,8 +168,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name);
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
if ((m_groupsServerURI == null) ||
(m_groupsServerURI == string.Empty))
if (string.IsNullOrEmpty(m_groupsServerURI))
{
m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]");
m_connectorEnabled = false;
@@ -354,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{
param["GroupID"] = GroupID.ToString();
}
if ((GroupName != null) && (GroupName != string.Empty))
if (!string.IsNullOrEmpty(GroupName))
{
param["Name"] = GroupName.ToString();
}