mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
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:
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
Vector3 ZeroVector = new Vector3(0, 0, 0);
|
||||
|
||||
bool nameSearch = (ts.name != null && ts.name != "");
|
||||
bool nameSearch = !string.IsNullOrEmpty(ts.name);
|
||||
|
||||
foreach (EntityBase ent in Entities)
|
||||
{
|
||||
@@ -605,7 +605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
return sensedEntities;
|
||||
senseEntity(sp);
|
||||
}
|
||||
else if (ts.name != null && ts.name != "")
|
||||
else if (!string.IsNullOrEmpty(ts.name))
|
||||
{
|
||||
ScenePresence sp;
|
||||
// Try lookup by name will return if/when found
|
||||
|
||||
Reference in New Issue
Block a user