mirror of
https://github.com/opensim/opensim.git
synced 2026-05-17 20:25:34 +08:00
* Mother of all commits:
* Cleaned up copyright notices in AssemblyInfo.cs's * Added Copyright headers to a bunch of files missing them * Replaced several common string instances with a static constant to prevent reallocation of the same strings thousands of times. "" -> String.Empty is the first such candidate.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
|
||||
{
|
||||
/*if (args[0].ToLower() == "lslexport")
|
||||
{
|
||||
string sequence = "";
|
||||
string sequence = String.Empty;
|
||||
|
||||
foreach (KeyValuePair<LLUUID, SceneObject> obj in script.world.Objects)
|
||||
{
|
||||
@@ -82,13 +82,13 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
|
||||
LLVector3 scale = prim.Scale;
|
||||
LLVector3 rootPos = prim.WorldPos;
|
||||
|
||||
string setPrimParams = "";
|
||||
string setPrimParams = String.Empty;
|
||||
|
||||
setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
|
||||
|
||||
return setPrimParams;
|
||||
*/
|
||||
return "";
|
||||
return System.String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
|
||||
public class PoolUtf8 : PoolItem
|
||||
{
|
||||
public string Value = "";
|
||||
public string Value = String.Empty;
|
||||
|
||||
public void readValue(byte[] data, ref int pointer, int length)
|
||||
{
|
||||
@@ -274,7 +274,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
|
||||
public class PoolClass : PoolItem
|
||||
{
|
||||
//public string name = "";
|
||||
//public string name = String.Empty;
|
||||
public ushort namePointer = 0;
|
||||
private ClassRecord parent;
|
||||
public PoolUtf8 Name;
|
||||
@@ -384,7 +384,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
{
|
||||
public ushort AccessFlags = 0;
|
||||
public ushort NameIndex = 0;
|
||||
public string Name = "";
|
||||
public string Name = String.Empty;
|
||||
public ushort DescriptorIndex = 0;
|
||||
public ushort AttributeCount = 0;
|
||||
public List<MethodAttribute> Attributes = new List<MethodAttribute>();
|
||||
@@ -436,7 +436,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
public class MethodAttribute
|
||||
{
|
||||
public ushort NameIndex = 0;
|
||||
public string Name = "";
|
||||
public string Name = String.Empty;
|
||||
public Int32 Length = 0;
|
||||
//for now only support code attribute
|
||||
public ushort MaxStack = 0;
|
||||
@@ -502,7 +502,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
public class SubAttribute
|
||||
{
|
||||
public ushort NameIndex = 0;
|
||||
public string Name = "";
|
||||
public string Name = String.Empty;
|
||||
public Int32 Length = 0;
|
||||
public byte[] Data;
|
||||
private ClassRecord parent;
|
||||
@@ -546,7 +546,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
{
|
||||
public ushort AccessFlags = 0;
|
||||
public ushort NameIndex = 0;
|
||||
public string Name = "";
|
||||
public string Name = String.Empty;
|
||||
public ushort DescriptorIndex = 0;
|
||||
public ushort AttributeCount = 0;
|
||||
public List<FieldAttribute> Attributes = new List<FieldAttribute>();
|
||||
@@ -605,7 +605,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
public class FieldAttribute
|
||||
{
|
||||
public ushort NameIndex = 0;
|
||||
public string Name = "";
|
||||
public string Name = String.Empty;
|
||||
public Int32 Length = 0;
|
||||
public byte[] Data;
|
||||
private ClassRecord parent;
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM
|
||||
string typ =
|
||||
((ClassRecord.PoolMethodRef) m_thread.currentClass.m_constantsPool[refIndex - 1]).
|
||||
mNameType.Type.Value;
|
||||
string typeparam = "";
|
||||
string typereturn = "";
|
||||
string typeparam = System.String.Empty;
|
||||
string typereturn = System.String.Empty;
|
||||
int firstbrak = 0;
|
||||
int secondbrak = 0;
|
||||
firstbrak = typ.LastIndexOf('(');
|
||||
|
||||
Reference in New Issue
Block a user