From: Michael Osias <mosias@us.ibm.com>
Stop .net generating ambiguous operator errors when two integers are compared for equality in LSL0.6.0-stable
parent
93ec7f0c3c
commit
d9dffc4a9a
|
@ -209,6 +209,14 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
// FIXME: these all should probably go into the respective region
|
||||
// modules
|
||||
|
||||
/// <summary>
|
||||
/// Processes a fetch inventory request and sends the reply
|
||||
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
// Request is like:
|
||||
//<llsd>
|
||||
// <map><key>folders</key>
|
||||
|
@ -255,8 +263,10 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
|
||||
inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", "");
|
||||
inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", "");
|
||||
|
||||
response += inventoryitemstr;
|
||||
}
|
||||
|
||||
if (response.Length == 0)
|
||||
{
|
||||
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
|
||||
|
@ -276,6 +286,11 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct an LLSD reply packet to a CAPS inventory request
|
||||
/// </summary>
|
||||
/// <param name="invFetch"></param>
|
||||
/// <returns></returns>
|
||||
private LLSDInventoryDescendents FetchInventoryReply(LLSDFetchInventoryDescendents invFetch)
|
||||
{
|
||||
LLSDInventoryDescendents reply = new LLSDInventoryDescendents();
|
||||
|
@ -333,6 +348,11 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
return reply;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an internal inventory item object into an LLSD object.
|
||||
/// </summary>
|
||||
/// <param name="invItem"></param>
|
||||
/// <returns></returns>
|
||||
private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
|
||||
{
|
||||
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
|
||||
|
|
|
@ -1249,6 +1249,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
return new LSLInteger(d);
|
||||
}
|
||||
|
||||
static public bool operator ==(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
bool ret = i1.value == i2.value;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static public bool operator !=(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
bool ret = i1.value != i2.value;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static public LSLInteger operator &(LSLInteger i1, LSLInteger i2)
|
||||
{
|
||||
int ret = i1.value & i2.value;
|
||||
|
|
Loading…
Reference in New Issue