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
|
// FIXME: these all should probably go into the respective region
|
||||||
// modules
|
// 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:
|
// Request is like:
|
||||||
//<llsd>
|
//<llsd>
|
||||||
// <map><key>folders</key>
|
// <map><key>folders</key>
|
||||||
|
@ -255,8 +263,10 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
|
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
|
||||||
inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", "");
|
inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", "");
|
||||||
inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", "");
|
inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", "");
|
||||||
|
|
||||||
response += inventoryitemstr;
|
response += inventoryitemstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.Length == 0)
|
if (response.Length == 0)
|
||||||
{
|
{
|
||||||
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
|
// 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;
|
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)
|
private LLSDInventoryDescendents FetchInventoryReply(LLSDFetchInventoryDescendents invFetch)
|
||||||
{
|
{
|
||||||
LLSDInventoryDescendents reply = new LLSDInventoryDescendents();
|
LLSDInventoryDescendents reply = new LLSDInventoryDescendents();
|
||||||
|
@ -333,6 +348,11 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
return reply;
|
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)
|
private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem)
|
||||||
{
|
{
|
||||||
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
|
LLSDInventoryItem llsdItem = new LLSDInventoryItem();
|
||||||
|
|
|
@ -1249,6 +1249,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
return new LSLInteger(d);
|
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)
|
static public LSLInteger operator &(LSLInteger i1, LSLInteger i2)
|
||||||
{
|
{
|
||||||
int ret = i1.value & i2.value;
|
int ret = i1.value & i2.value;
|
||||||
|
|
Loading…
Reference in New Issue