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/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs | 2 +- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs index 144895c..b7a4d1a 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess private void AdjustIdentifiers(AssetMetadata meta) { - if (meta.CreatorID != null && meta.CreatorID != string.Empty) + if (!string.IsNullOrEmpty(meta.CreatorID)) { UUID uuid = UUID.Zero; UUID.TryParse(meta.CreatorID, out uuid); diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index d3926cc..3fb5195 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -466,7 +466,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement return userdata.ServerURLs[serverType].ToString(); } - if (userdata.HomeURL != null && userdata.HomeURL != string.Empty) + if (!string.IsNullOrEmpty(userdata.HomeURL)) { //m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}", @@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement if (oldUser != null) { - if (creatorData == null || creatorData == String.Empty) + if (string.IsNullOrEmpty(creatorData)) { //ignore updates without creator data return; -- cgit v1.1