mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
use array.Empty<byte>
This commit is contained in:
@@ -1474,7 +1474,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||
}
|
||||
public byte[] GetThrottlesPacked(float multiplier)
|
||||
{
|
||||
return new byte[0];
|
||||
return Array.Empty<byte>();
|
||||
}
|
||||
|
||||
#pragma warning disable 0067
|
||||
|
||||
@@ -454,7 +454,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
msg.ParentEstateID = 0;
|
||||
msg.Position = Vector3.Zero;
|
||||
msg.RegionID = UUID.Zero.Guid;
|
||||
msg.binaryBucket = new byte[0];
|
||||
msg.binaryBucket = Array.Empty<byte>();
|
||||
|
||||
OutgoingInstantMessage(msg, inviteInfo.AgentID);
|
||||
|
||||
@@ -1222,7 +1222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||
msg.fromAgentName = string.Empty;
|
||||
msg.message = string.Empty;
|
||||
msg.binaryBucket = new byte[0];
|
||||
msg.binaryBucket = Array.Empty<byte>();
|
||||
}
|
||||
|
||||
return msg;
|
||||
@@ -1365,7 +1365,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
msg.ParentEstateID = 0;
|
||||
msg.Position = Vector3.Zero;
|
||||
msg.RegionID = regionInfo.RegionID.Guid;
|
||||
msg.binaryBucket = new byte[0];
|
||||
msg.binaryBucket = Array.Empty<byte>();
|
||||
OutgoingInstantMessage(msg, ejecteeID);
|
||||
|
||||
// Message to ejector
|
||||
@@ -1386,7 +1386,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
msg.ParentEstateID = 0;
|
||||
msg.Position = Vector3.Zero;
|
||||
msg.RegionID = regionInfo.RegionID.Guid;
|
||||
msg.binaryBucket = new byte[0];
|
||||
msg.binaryBucket = Array.Empty<byte>();
|
||||
OutgoingInstantMessage(msg, agentID);
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||
client.SendAlertMessage(e.Message + " ");
|
||||
}
|
||||
|
||||
client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds, 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
|
||||
client.SendMoneyBalance(TransactionID, true, Array.Empty<byte>(), returnfunds, 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
OnInstantMessage(this, new GridInstantMessage(m_scene,
|
||||
m_uuid, m_firstname + " " + m_lastname,
|
||||
target, 0, false, message,
|
||||
UUID.Zero, false, Position, new byte[0], true));
|
||||
UUID.Zero, false, Position, Array.Empty<byte>(), true));
|
||||
}
|
||||
|
||||
public void SendAgentOffline(UUID[] agentIDs)
|
||||
@@ -705,7 +705,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
}
|
||||
public byte[] GetThrottlesPacked(float multiplier)
|
||||
{
|
||||
return new byte[0];
|
||||
return Array.Empty<byte>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||
int width, int height, bool usetex)
|
||||
{
|
||||
if (!m_Enabled)
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
|
||||
using (Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, height, usetex))
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||
m_log.Debug("[WORLDVIEW]: Exception: " + e.ToString());
|
||||
}
|
||||
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
}
|
||||
|
||||
public Byte[] SendWorldView(Dictionary<string, object> request)
|
||||
@@ -99,25 +99,25 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||
bool usetex;
|
||||
|
||||
if (!request.ContainsKey("posX"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("posY"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("posZ"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("rotX"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("rotY"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("rotZ"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("fov"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("width"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("height"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
if (!request.ContainsKey("usetex"))
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new Byte[0];
|
||||
return Array.Empty<byte>();
|
||||
}
|
||||
|
||||
Vector3 pos = new Vector3(posX, posY, posZ);
|
||||
|
||||
Reference in New Issue
Block a user