diff --git a/Source/Bind/GL2/Generator.cs b/Source/Bind/GL2/Generator.cs index 7abef389..886571f3 100644 --- a/Source/Bind/GL2/Generator.cs +++ b/Source/Bind/GL2/Generator.cs @@ -76,7 +76,7 @@ namespace Bind.GL2 Function.Initialize(); Delegate.Initialize(glSpec, glSpecExt); - this.WriteBindings( + WriteBindings( Delegate.Delegates, Function.Wrappers, Enum.GLEnums); diff --git a/Source/Bind/Glu/Generator.cs b/Source/Bind/Glu/Generator.cs index 83f47426..c966be6e 100644 --- a/Source/Bind/Glu/Generator.cs +++ b/Source/Bind/Glu/Generator.cs @@ -60,7 +60,7 @@ namespace Bind.Glu Trace.WriteLine("Processing specs, please wait..."); //this.Translate(); - this.WriteBindings( + WriteBindings( Delegate.Delegates, Function.Wrappers, Enum.GLEnums); diff --git a/Source/Bind/Glx/Generator.cs b/Source/Bind/Glx/Generator.cs index d60ec7be..7e76be95 100644 --- a/Source/Bind/Glx/Generator.cs +++ b/Source/Bind/Glx/Generator.cs @@ -57,7 +57,7 @@ namespace Bind.Glx Trace.WriteLine("Processing specs, please wait..."); //this.Translate(); - this.WriteBindings( + WriteBindings( Delegate.Delegates, Function.Wrappers, Enum.GLEnums); diff --git a/Source/Bind/Structures/Delegate.cs b/Source/Bind/Structures/Delegate.cs index 0ed4c4b3..4da74ac2 100644 --- a/Source/Bind/Structures/Delegate.cs +++ b/Source/Bind/Structures/Delegate.cs @@ -72,11 +72,11 @@ namespace Bind.Structures public Delegate(Delegate d) { - this.Category = d.Category; - this.Name = d.Name; - this.Parameters = new ParameterCollection(d.Parameters); - this.ReturnType = new Type(d.ReturnType); - this.Version = d.Version; + Category = d.Category; + Name = d.Name; + Parameters = new ParameterCollection(d.Parameters); + ReturnType = new Type(d.ReturnType); + Version = d.Version; //this.Version = !String.IsNullOrEmpty(d.Version) ? new string(d.Version.ToCharArray()) : ""; } @@ -525,7 +525,7 @@ namespace Bind.Structures } } - ReturnType.Translate(overrides, this.Category); + ReturnType.Translate(overrides, Category); if (ReturnType.CurrentType.ToLower().Contains("void") && ReturnType.Pointer != 0) { @@ -581,7 +581,7 @@ namespace Bind.Structures } } - Parameters[i].Translate(overrides, this.Category); + Parameters[i].Translate(overrides, Category); if (Parameters[i].CurrentType == "UInt16" && Name.Contains("LineStipple")) Parameters[i].WrapperType = WrapperTypes.UncheckedParameter; @@ -627,9 +627,9 @@ namespace Bind.Structures { public void Add(Delegate d) { - if (!this.ContainsKey(d.Name)) + if (!ContainsKey(d.Name)) { - this.Add(d.Name, d); + Add(d.Name, d); } else { diff --git a/Source/Bind/Structures/Enum.cs b/Source/Bind/Structures/Enum.cs index 3403d3b8..0edf1a67 100644 --- a/Source/Bind/Structures/Enum.cs +++ b/Source/Bind/Structures/Enum.cs @@ -224,7 +224,7 @@ namespace Bind.Structures // Translate enum names. { List keys_to_update = new List(); - foreach (Enum e in this.Values) + foreach (Enum e in Values) { string name = e.Name; @@ -249,14 +249,14 @@ namespace Bind.Structures foreach (string name in keys_to_update) { Enum e = this[name]; - this.Remove(name); - this.Add(e.Name, e); + Remove(name); + Add(e.Name, e); } keys_to_update = null; } - foreach (Enum e in this.Values) + foreach (Enum e in Values) { XPathNavigator enum_override = overrides.CreateNavigator().SelectSingleNode(String.Format(path, e.Name)); foreach (Constant c in e.ConstantCollection.Values) @@ -283,7 +283,7 @@ namespace Bind.Structures // In this case try searching all enums for the correct constant to alias (stupid opengl specs). if (String.IsNullOrEmpty(c.Reference) && !Char.IsDigit(c.Value[0])) { - foreach (Enum @enum in this.Values) + foreach (Enum @enum in Values) { // Skip generic GLenum if (@enum.Name == "GLenum") @@ -299,7 +299,7 @@ namespace Bind.Structures } } - foreach (Enum e in this.Values) + foreach (Enum e in Values) { restart: foreach (Constant c in e.ConstantCollection.Values) @@ -320,7 +320,7 @@ namespace Bind.Structures List removed_tokens = new List(); - foreach (Enum e in this.Values) + foreach (Enum e in Values) { if (e.Name == "All") continue; diff --git a/Source/Bind/Structures/Function.cs b/Source/Bind/Structures/Function.cs index 076f2fb6..cf78a293 100644 --- a/Source/Bind/Structures/Function.cs +++ b/Source/Bind/Structures/Function.cs @@ -54,7 +54,7 @@ namespace Bind.Structures public Function(Function f) : this((Delegate)f) { - this.Body = new FunctionBody(f.Body); + Body = new FunctionBody(f.Body); } #endregion @@ -73,7 +73,7 @@ namespace Bind.Structures public void TurnVoidPointersToIntPtr() { - foreach (Parameter p in this.Parameters) + foreach (Parameter p in Parameters) { if (p.Pointer != 0 && p.CurrentType == "void") { @@ -230,9 +230,9 @@ namespace Bind.Structures public bool Equals(Function other) { return - !String.IsNullOrEmpty(this.TrimmedName) && !String.IsNullOrEmpty(other.TrimmedName) && - this.TrimmedName == other.TrimmedName && - this.Parameters.ToString(true) == other.Parameters.ToString(true); + !String.IsNullOrEmpty(TrimmedName) && !String.IsNullOrEmpty(other.TrimmedName) && + TrimmedName == other.TrimmedName && + Parameters.ToString(true) == other.Parameters.ToString(true); } #endregion @@ -571,7 +571,7 @@ namespace Bind.Structures } } - this.Body = f.Body; + Body = f.Body; } #endregion @@ -603,7 +603,7 @@ namespace Bind.Structures { foreach (string s in fb) { - this.Add(s); + Add(s); } } @@ -629,16 +629,16 @@ namespace Bind.Structures { foreach (string t in collection) { - this.Add(t); + Add(t); } } public override string ToString() { - if (this.Count == 0) + if (Count == 0) return String.Empty; - StringBuilder sb = new StringBuilder(this.Count); + StringBuilder sb = new StringBuilder(Count); sb.AppendLine("{"); foreach (string s in this) @@ -661,9 +661,9 @@ namespace Bind.Structures public void Add(Function f) { - if (!this.ContainsKey(f.Extension)) + if (!ContainsKey(f.Extension)) { - this.Add(f.Extension, new List()); + Add(f.Extension, new List()); this[f.Extension].Add(f); } else @@ -676,7 +676,7 @@ namespace Bind.Structures { foreach (Function f in functions) { - this.Add(f); + Add(f); } } diff --git a/Source/Bind/Structures/Parameter.cs b/Source/Bind/Structures/Parameter.cs index 76168fc9..a5978cc1 100644 --- a/Source/Bind/Structures/Parameter.cs +++ b/Source/Bind/Structures/Parameter.cs @@ -41,12 +41,12 @@ namespace Bind.Structures if (p == null) return; - this.Name = p.Name; - this.Unchecked = p.Unchecked; - this.UnmanagedType = p.UnmanagedType; - this.Generic = p.Generic; - this.Flow = p.Flow; - this.cache = p.cache; + Name = p.Name; + Unchecked = p.Unchecked; + UnmanagedType = p.UnmanagedType; + Generic = p.Generic; + Flow = p.Flow; + cache = p.cache; //this.rebuild = false; } @@ -381,7 +381,7 @@ namespace Bind.Structures { foreach (Parameter p in pc) { - this.Add(new Parameter(p)); + Add(new Parameter(p)); } } @@ -531,7 +531,7 @@ namespace Bind.Structures StringBuilder sb = new StringBuilder(); sb.Append("("); - if (this.Count > 0) + if (Count > 0) { foreach (Parameter p in this) { @@ -576,7 +576,7 @@ namespace Bind.Structures sb.Append("("); - if (this.Count > 0) + if (Count > 0) { foreach (Parameter p in this) { diff --git a/Source/Bind/Structures/Type.cs b/Source/Bind/Structures/Type.cs index 07e8eb65..5ddec9aa 100644 --- a/Source/Bind/Structures/Type.cs +++ b/Source/Bind/Structures/Type.cs @@ -54,13 +54,13 @@ namespace Bind.Structures { if (t != null) { - this.CurrentType = t.CurrentType; - this.PreviousType = t.PreviousType; - this.WrapperType = t.WrapperType; - this.Array = t.Array; - this.Pointer = t.Pointer; - this.Reference = t.Reference; - this.ElementCount = t.ElementCount; + CurrentType = t.CurrentType; + PreviousType = t.PreviousType; + WrapperType = t.WrapperType; + Array = t.Array; + Pointer = t.Pointer; + Reference = t.Reference; + ElementCount = t.ElementCount; } } diff --git a/Source/Bind/Wgl/Generator.cs b/Source/Bind/Wgl/Generator.cs index f42094fa..c2d7f51f 100644 --- a/Source/Bind/Wgl/Generator.cs +++ b/Source/Bind/Wgl/Generator.cs @@ -56,7 +56,7 @@ namespace Bind.Wgl Trace.WriteLine("Processing specs, please wait..."); //this.Translate(); - this.WriteBindings( + WriteBindings( Delegate.Delegates, Function.Wrappers, Enum.GLEnums);