!= UUID.Zero is slow

This commit is contained in:
UbitUmarov
2022-01-09 02:28:51 +00:00
parent 7e0fc95c3a
commit da928d6099
78 changed files with 254 additions and 263 deletions

View File

@@ -265,7 +265,7 @@ namespace OpenSim.Framework
UUID itemID = m_wearables[i][j].ItemID;
UUID assetID = app.Wearables[i].GetAsset(itemID);
if (assetID != UUID.Zero)
if (!assetID.IsZero())
m_wearables[i].Add(itemID, assetID);
}
}
@@ -622,7 +622,7 @@ namespace OpenSim.Framework
// "[AVATAR APPEARANCE]: Found existing attachment for {0}, asset {1} at point {2}",
// existingAttachment.ItemID, existingAttachment.AssetID, existingAttachment.AttachPoint);
if (existingAttachment.AssetID != UUID.Zero && existingAttachment.AttachPoint == (attachpoint & 0x7F))
if (!existingAttachment.AssetID.IsZero() && existingAttachment.AttachPoint == (attachpoint & 0x7F))
{
m_log.DebugFormat(
"[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}",

View File

@@ -205,7 +205,7 @@ namespace OpenSim.Framework
}
}
if (itemID != UUID.Zero)
if (!itemID.IsZero())
{
m_ids.Remove(itemID);
m_items.Remove(itemID);

View File

@@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring
public void ReceiveClassicSimStatsPacket(SimStats stats)
{
UUID id = stats.RegionUUID;
if (id != UUID.Zero)
if (!id.IsZero())
{
if(ReceivedStats.Count == 0)
firstReceivedRegion = id;

View File

@@ -828,13 +828,13 @@ namespace OpenSim.Framework
if (AgentCapacity > 0)
config.Set("MaxAgents", AgentCapacity);
if (ScopeID != UUID.Zero)
if (!ScopeID.IsZero())
config.Set("ScopeID", ScopeID.ToString());
if (RegionType != String.Empty)
config.Set("RegionType", RegionType);
if (m_maptileStaticUUID != UUID.Zero)
if (!m_maptileStaticUUID.IsZero())
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
if (MaptileStaticFile != null && MaptileStaticFile != String.Empty)

View File

@@ -321,7 +321,7 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteEndElement();
xtw.WriteStartElement("Telehub");
if (settings.TelehubObject != UUID.Zero)
if (!settings.TelehubObject.IsZero())
{
xtw.WriteElementString("TelehubObject", settings.TelehubObject.ToString());
foreach (SpawnPoint sp in settings.SpawnPoints())