From 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Nov 2013 21:45:08 +0000 Subject: refactor: replace verbose checks with String.IsNullOrEmpty where applicable. Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845 --- OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs | 4 ++-- OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Addons') diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs index 59fec6f..653dbac 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs @@ -101,7 +101,7 @@ namespace OpenSim.Groups Dictionary sendData = new Dictionary(); if (GroupID != UUID.Zero) sendData["GroupID"] = GroupID.ToString(); - if (GroupName != null && GroupName != string.Empty) + if (!string.IsNullOrEmpty(GroupName)) sendData["Name"] = GroupsDataUtils.Sanitize(GroupName); sendData["RequestingAgentID"] = RequestingAgentID; @@ -275,7 +275,7 @@ namespace OpenSim.Groups //m_log.DebugFormat("[XXX]: reply was {0}", reply); - if (reply == string.Empty || reply == null) + if (string.IsNullOrEmpty(reply)) return null; Dictionary replyData = ServerUtils.ParseXmlResponse( diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs index 161ca0c..ed41978 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs @@ -120,7 +120,7 @@ namespace OpenSim.Groups Dictionary sendData = new Dictionary(); if (GroupID != UUID.Zero) sendData["GroupID"] = GroupID.ToString(); - if (GroupName != null && GroupName != string.Empty) + if (!string.IsNullOrEmpty(GroupName)) sendData["Name"] = GroupsDataUtils.Sanitize(GroupName); sendData["RequestingAgentID"] = RequestingAgentID; -- cgit v1.1