aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMike Mazur2008-07-24 05:23:38 +0000
committerMike Mazur2008-07-24 05:23:38 +0000
commit117cc09edcc796f93cb05f98d7589b7ca5313ee8 (patch)
treef4023623fd833dd9e681e4b9556a099a773fc2fb /OpenSim/Region
parentAddresses Mantis #1810 (diff)
downloadopensim-SC_OLD-117cc09edcc796f93cb05f98d7589b7ca5313ee8.zip
opensim-SC_OLD-117cc09edcc796f93cb05f98d7589b7ca5313ee8.tar.gz
opensim-SC_OLD-117cc09edcc796f93cb05f98d7589b7ca5313ee8.tar.bz2
opensim-SC_OLD-117cc09edcc796f93cb05f98d7589b7ca5313ee8.tar.xz
Replace implicit casts from LSLFloat to int and uint which were removed in
r5487. Also put the unit tests back for Bamboo to execute them, let's see how this goes.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs10
2 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index be790d6..7274fa5 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -1422,6 +1422,16 @@ namespace OpenSim.Region.ScriptEngine.Common
1422 1422
1423 #region Operators 1423 #region Operators
1424 1424
1425 static public implicit operator int(LSLFloat f)
1426 {
1427 return (int)f.value;
1428 }
1429
1430 static public implicit operator uint(LSLFloat f)
1431 {
1432 return (uint) Math.Abs(f.value);
1433 }
1434
1425 static public implicit operator Boolean(LSLFloat f) 1435 static public implicit operator Boolean(LSLFloat f)
1426 { 1436 {
1427 if (f.value == 0.0) 1437 if (f.value == 0.0)
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 0cddf36..acfe613 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1477,6 +1477,16 @@ namespace OpenSim.Region.ScriptEngine.Shared
1477 1477
1478 #region Operators 1478 #region Operators
1479 1479
1480 static public implicit operator int(LSLFloat f)
1481 {
1482 return (int)f.value;
1483 }
1484
1485 static public implicit operator uint(LSLFloat f)
1486 {
1487 return (uint) Math.Abs(f.value);
1488 }
1489
1480 static public implicit operator Boolean(LSLFloat f) 1490 static public implicit operator Boolean(LSLFloat f)
1481 { 1491 {
1482 if (f.value == 0.0) 1492 if (f.value == 0.0)