diff options
author | SignpostMarv | 2012-08-18 15:04:07 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 18:29:59 +0100 |
commit | fb84ff96a9ac7df564fb8f8242e0ff0d2638b438 (patch) | |
tree | 4184439a6650dbe90c00f5a51ab87ac255e5d863 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |
parent | adding missing refactor for LSL_Vector (diff) | |
download | opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.zip opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.gz opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.bz2 opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.xz |
implicit operators mean one does not need to instantiate new objects manually
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 929948b..84cf6ca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -333,8 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
333 | { | 333 | { |
334 | if (type == typeof(OpenMetaverse.Quaternion)) | 334 | if (type == typeof(OpenMetaverse.Quaternion)) |
335 | { | 335 | { |
336 | LSL_Rotation rot = (LSL_Rotation)lslparm; | 336 | return (OpenMetaverse.Quaternion)((LSL_Rotation)lslparm); |
337 | return new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s); | ||
338 | } | 337 | } |
339 | } | 338 | } |
340 | 339 | ||
@@ -366,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
366 | result[i] = new UUID((LSL_Key)plist[i]); | 365 | result[i] = new UUID((LSL_Key)plist[i]); |
367 | else if (plist[i] is LSL_Rotation) | 366 | else if (plist[i] is LSL_Rotation) |
368 | { | 367 | { |
369 | LSL_Rotation rot = (LSL_Rotation)plist[i]; | 368 | result[i] = (OpenMetaverse.Quaternion)( |
370 | result[i] = new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s); | 369 | (LSL_Rotation)plist[i]); |
371 | } | 370 | } |
372 | else if (plist[i] is LSL_Vector) | 371 | else if (plist[i] is LSL_Vector) |
373 | { | 372 | { |