Merge pull request #608 from Nihlus/cleanup-6-keyword-spacing

Correct keyword spacing
This commit is contained in:
Jarl Gullberg 2017-07-30 17:28:04 +02:00 committed by GitHub
commit e9422ab25c
13 changed files with 47 additions and 47 deletions

View file

@ -709,13 +709,13 @@ namespace Bind
if (!String.IsNullOrEmpty(p.ComputeSize))
{
int count;
if(Int32.TryParse(p.ComputeSize, out count))
if (Int32.TryParse(p.ComputeSize, out count))
{
attributes.Add(String.Format("CountAttribute(Count = {0})", count));
}
else
{
if(p.ComputeSize.StartsWith("COMPSIZE"))
if (p.ComputeSize.StartsWith("COMPSIZE"))
{
//remove the compsize hint, just keep comma delimited param names
var len = "COMPSIZE(".Length;
@ -729,7 +729,7 @@ namespace Bind
}
}
if(attributes.Count != 0)
if (attributes.Count != 0)
{
sb.Append("[");
sb.Append(string.Join(", ", attributes));

View file

@ -87,7 +87,7 @@ namespace OpenTK
{
sbyte* str = (sbyte*)ptr.ToPointer();
int len = 0;
while(*str != 0)
while (*str != 0)
{
++len;
++str;

View file

@ -111,7 +111,7 @@ namespace OpenTK.Input
{
fixed (int* k = Keys)
{
for(int i = 0; i < NumInts; ++i)
for (int i = 0; i < NumInts; ++i)
{
if (k[i] != 0)
{

View file

@ -70,21 +70,21 @@ namespace OpenTK
/// </summary>
public float this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}

View file

@ -86,21 +86,21 @@ namespace OpenTK
/// </summary>
public double this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}

View file

@ -114,29 +114,29 @@ namespace OpenTK
/// </summary>
public float this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
else if(index == 2)
else if (index == 2)
{
return Z;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}
else if(index == 2)
else if (index == 2)
{
Z = value;
}

View file

@ -111,29 +111,29 @@ namespace OpenTK
/// </summary>
public double this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
else if(index == 2)
else if (index == 2)
{
return Z;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}
else if(index == 2)
else if (index == 2)
{
Z = value;
}

View file

@ -172,37 +172,37 @@ namespace OpenTK
/// </summary>
public float this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
else if(index == 2)
else if (index == 2)
{
return Z;
}
else if(index == 3)
else if (index == 3)
{
return W;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}
else if(index == 2)
else if (index == 2)
{
Z = value;
}
else if(index == 3)
else if (index == 3)
{
W = value;
}

View file

@ -169,37 +169,37 @@ namespace OpenTK
/// </summary>
public double this[int index] {
get{
if(index == 0)
if (index == 0)
{
return X;
}
else if(index == 1)
else if (index == 1)
{
return Y;
}
else if(index == 2)
else if (index == 2)
{
return Z;
}
else if(index == 3)
else if (index == 3)
{
return W;
}
throw new IndexOutOfRangeException("You tried to access this vector at index: " + index);
} set{
if(index == 0)
if (index == 0)
{
X = value;
}
else if(index == 1)
else if (index == 1)
{
Y = value;
}
else if(index == 2)
else if (index == 2)
{
Z = value;
}
else if(index == 3)
else if (index == 3)
{
W = value;
}

View file

@ -107,7 +107,7 @@ namespace OpenTK.Platform.Windows
string deviceClassGUID = (string)regkey.GetValue("ClassGUID"); // for windows 8 support via OpenTK issue 3198
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
if(deviceClass == null || deviceClass.Equals(string.Empty)){
if (deviceClass == null || deviceClass.Equals(string.Empty)){
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
}

View file

@ -106,7 +106,7 @@ namespace OpenTK.Platform.Windows
string deviceDesc = (string)regkey.GetValue("DeviceDesc");
string deviceClass = (string)regkey.GetValue("Class") as string;
if(deviceClass == null)
if (deviceClass == null)
{
// Added to address OpenTK issue 3198 with mouse on Windows 8
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");

View file

@ -1651,7 +1651,7 @@ namespace OpenTK.Platform.X11
}
else
{
fixed(byte* pixels = value.Data)
fixed (byte* pixels = value.Data)
{
var xcursorimage = Functions.XcursorImageCreate(value.Width, value.Height);
xcursorimage->xhot = (uint)value.X;
@ -1696,7 +1696,7 @@ namespace OpenTK.Platform.X11
cursor_visible = true;
}
}
else if(!value && cursor_visible)
else if (!value && cursor_visible)
{
using (new XLock(window.Display))
{
@ -1884,7 +1884,7 @@ namespace OpenTK.Platform.X11
if (window != null && window.Handle != IntPtr.Zero)
{
Functions.XFreeCursor(window.Display, EmptyCursor);
if(cursorHandle != IntPtr.Zero)
if (cursorHandle != IntPtr.Zero)
{
Functions.XFreeCursor(window.Display, cursorHandle);
}

View file

@ -6,7 +6,7 @@
<Rule Id="SA0002" Action="Error" /> <!-- Invalid settings file -->
<!-- Spacing rules -->
<Rule Id="SA1000" Action="None" /> <!-- Keywords must be spaced correctly -->
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly -->
<Rule Id="SA1001" Action="None" /> <!-- Commas must be spaced correctly -->
<Rule Id="SA1002" Action="None" /> <!-- Semicolons must be spaced correctly -->
<Rule Id="SA1003" Action="None" /> <!-- Symbols must be spaced correctly -->