From c8349e21c43b1232aa923783a39cca224460551a Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 21 Sep 2008 02:41:22 +0000 Subject: Update svn properties, minor formatting cleanup. --- .../Shared/Api/Implementation/LSL_Api.cs | 2 +- .../Shared/Api/Implementation/OSSL_Api.cs | 22 +++++++++++----------- .../ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c806697..d2cfdca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -586,7 +586,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api double z = axis.z * s; double w = Math.Cos(angle / 2); - if(Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w)) + if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w)) return new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f); return new LSL_Types.Quaternion((float)x, (float)y, (float)z, (float)w); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index c0c776d..ffde7ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -755,18 +755,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // Console.WriteLine(""+JSON[i]); - switch(JSON[i]) + switch (JSON[i]) { case '{': // create hashtable and add it to the stack or array if we are populating one, we can have a lot of nested objects in JSON Hashtable currentObject = new Hashtable(); - if(objectStack.Count==0) // the stack should only be empty for the first outer object + if (objectStack.Count==0) // the stack should only be empty for the first outer object { objectStack.Push(jsondata); } - else if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + else if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { // add it to the parent array ((ArrayList)objectStack.Peek()).Add(currentObject); @@ -792,17 +792,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api i++; // move to next char // just loop through until the next quote mark storing the string - while(JSON[i]!='"') + while (JSON[i]!='"') { tokenValue+=JSON[i++]; } // ok we've got a string, if we've got an array on the top of the stack then we store it - if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { ((ArrayList)objectStack.Peek()).Add(tokenValue); } - else if(currentKey==null) // no key stored and its not an array this must be a key so store it + else if (currentKey==null) // no key stored and its not an array this must be a key so store it { currentKey = tokenValue; } @@ -824,7 +824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case '[': // array start ArrayList currentArray = new ArrayList(); - if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { ((ArrayList)objectStack.Peek()).Add(currentArray); } @@ -846,7 +846,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case 't': // we've found a character start not in quotes, it must be a boolean true - if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { ((ArrayList)objectStack.Peek()).Add(true); } @@ -860,7 +860,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case 'f': // we've found a character start not in quotes, it must be a boolean false - if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { ((ArrayList)objectStack.Peek()).Add(false); } @@ -879,7 +879,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string numberValue=""; // just loop through until the next known marker quote mark storing the string - while(JSON[i] != '"' && JSON[i] != ',' && JSON[i] != ']' && JSON[i] != '}' && JSON[i] != ' ') + while (JSON[i] != '"' && JSON[i] != ',' && JSON[i] != ']' && JSON[i] != '}' && JSON[i] != ' ') { numberValue+=""+JSON[i++]; } @@ -887,7 +887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api i--; // we want to process this caracter that marked the end of this string in the main loop // ok we've got a string, if we've got an array on the top of the stack then we store it - if(objectStack.Peek().ToString()=="System.Collections.ArrayList") + if (objectStack.Peek().ToString()=="System.Collections.ArrayList") { ((ArrayList)objectStack.Peek()).Add(numberValue); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index ba1aa2a..5836cc1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -169,7 +169,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase Array.Copy(data, 0, v.Data, 0, data.Length); m_Fields[var.Key].SetValue(this, v); } - else if(m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLInteger) || + else if (m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLInteger) || m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLString) || m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLFloat) || m_Fields[var.Key].FieldType == typeof(Int32) || -- cgit v1.1