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/Framework/Scenes/SceneObjectPart.cs | 2 +- .../Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9e6c25d..dcbb509 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -473,7 +473,7 @@ namespace OpenSim.Region.Framework.Scenes { get { - if (CreatorData != null && CreatorData != string.Empty) + if (!string.IsNullOrEmpty(CreatorData)) return CreatorID.ToString() + ';' + CreatorData; else return CreatorID.ToString(); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 3ea936c..f07dee9 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization WriteUUID(writer, "CreatorID", sop.CreatorID, options); - if (sop.CreatorData != null && sop.CreatorData != string.Empty) + if (!string.IsNullOrEmpty(sop.CreatorData)) writer.WriteElementString("CreatorData", sop.CreatorData); else if (options.ContainsKey("home")) { @@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization WriteUUID(writer, "CreatorID", item.CreatorID, options); - if (item.CreatorData != null && item.CreatorData != string.Empty) + if (!string.IsNullOrEmpty(item.CreatorData)) writer.WriteElementString("CreatorData", item.CreatorData); else if (options.ContainsKey("home")) { -- cgit v1.1