mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
== string.Empty is .Lenght == 0
This commit is contained in:
@@ -587,7 +587,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public static SOPVehicle FromXml2(string text)
|
||||
{
|
||||
if (text == String.Empty)
|
||||
if (text.Length == 0)
|
||||
return null;
|
||||
|
||||
UTF8Encoding enc = new UTF8Encoding();
|
||||
|
||||
@@ -1068,7 +1068,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
if (newName == String.Empty)
|
||||
if (newName.Length == 0)
|
||||
newName = item.Name;
|
||||
|
||||
AssetBase asset = AssetService.Get(item.AssetID.ToString());
|
||||
|
||||
@@ -545,7 +545,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
Scene s = (Scene)ins;
|
||||
|
||||
if (objXMLData == String.Empty)
|
||||
if (objXMLData.Length == 0)
|
||||
return;
|
||||
|
||||
IScriptModule scriptModule = null;
|
||||
|
||||
@@ -158,10 +158,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get
|
||||
{
|
||||
// assume SitTargetOrientation is normalized (as needed elsewhere)
|
||||
if( SitTargetPosition != Vector3.Zero ||
|
||||
SitTargetOrientation.X != 0f ||
|
||||
SitTargetOrientation.Y != 0f ||
|
||||
SitTargetOrientation.Z != 0f)
|
||||
if( !SitTargetPosition.IsZero() || !SitTargetOrientation.IsIdentityOrZero())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -534,7 +531,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
set
|
||||
{
|
||||
CreatorData = string.Empty;
|
||||
if ((value == null) || (value != null && value == string.Empty))
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return;
|
||||
|
||||
// value is uuid or uuid;homeuri;firstname lastname
|
||||
|
||||
@@ -1008,7 +1008,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
protected void AddInventoryItem(string name, TaskInventoryItem item, bool allowedDrop)
|
||||
{
|
||||
name = FindAvailableInventoryName(name);
|
||||
if (name == String.Empty)
|
||||
if (name.Length == 0)
|
||||
return;
|
||||
|
||||
item.ParentID = m_part.UUID;
|
||||
|
||||
Reference in New Issue
Block a user