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

@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// or creator data is present. Otherwise, use the estate owner instead.
foreach (SceneObjectPart part in sceneObject.Parts)
{
if (part.CreatorData == null || part.CreatorData == string.Empty)
if (string.IsNullOrEmpty(part.CreatorData))
{
if (!ResolveUserUuid(scene, part.CreatorID))
part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
@@ -498,7 +498,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
}
if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty)
if (string.IsNullOrEmpty(kvp.Value.CreatorData))
{
if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;