Correct keyword spacing in OpenTK.

This commit is contained in:
Jarl Gullberg 2017-07-28 12:29:22 +02:00
parent 1260fd0a6b
commit 7090695ac6
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23
11 changed files with 43 additions and 43 deletions

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);
}