From 7090695ac6627ea4cf071e6433b446ac265b7ebb Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Fri, 28 Jul 2017 12:29:22 +0200 Subject: [PATCH] Correct keyword spacing in OpenTK. --- src/OpenTK/BindingsBase.cs | 2 +- src/OpenTK/Input/KeyboardState.cs | 2 +- src/OpenTK/Math/Vector2.cs | 8 ++++---- src/OpenTK/Math/Vector2d.cs | 8 ++++---- src/OpenTK/Math/Vector3.cs | 12 ++++++------ src/OpenTK/Math/Vector3d.cs | 12 ++++++------ src/OpenTK/Math/Vector4.cs | 16 ++++++++-------- src/OpenTK/Math/Vector4d.cs | 16 ++++++++-------- src/OpenTK/Platform/Windows/WinRawKeyboard.cs | 2 +- src/OpenTK/Platform/Windows/WinRawMouse.cs | 2 +- src/OpenTK/Platform/X11/X11GLNative.cs | 6 +++--- 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/OpenTK/BindingsBase.cs b/src/OpenTK/BindingsBase.cs index cafd309a..977d31df 100644 --- a/src/OpenTK/BindingsBase.cs +++ b/src/OpenTK/BindingsBase.cs @@ -87,7 +87,7 @@ namespace OpenTK { sbyte* str = (sbyte*)ptr.ToPointer(); int len = 0; - while(*str != 0) + while (*str != 0) { ++len; ++str; diff --git a/src/OpenTK/Input/KeyboardState.cs b/src/OpenTK/Input/KeyboardState.cs index 9e93ad1c..a975834b 100644 --- a/src/OpenTK/Input/KeyboardState.cs +++ b/src/OpenTK/Input/KeyboardState.cs @@ -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) { diff --git a/src/OpenTK/Math/Vector2.cs b/src/OpenTK/Math/Vector2.cs index 0acc9b24..47600187 100644 --- a/src/OpenTK/Math/Vector2.cs +++ b/src/OpenTK/Math/Vector2.cs @@ -70,21 +70,21 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Math/Vector2d.cs b/src/OpenTK/Math/Vector2d.cs index b9bf3729..7cf644c6 100644 --- a/src/OpenTK/Math/Vector2d.cs +++ b/src/OpenTK/Math/Vector2d.cs @@ -86,21 +86,21 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Math/Vector3.cs b/src/OpenTK/Math/Vector3.cs index 93b171b6..f447fad7 100644 --- a/src/OpenTK/Math/Vector3.cs +++ b/src/OpenTK/Math/Vector3.cs @@ -114,29 +114,29 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Math/Vector3d.cs b/src/OpenTK/Math/Vector3d.cs index 5cee34e2..3633d2e9 100644 --- a/src/OpenTK/Math/Vector3d.cs +++ b/src/OpenTK/Math/Vector3d.cs @@ -111,29 +111,29 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Math/Vector4.cs b/src/OpenTK/Math/Vector4.cs index c33e5e22..c798f874 100644 --- a/src/OpenTK/Math/Vector4.cs +++ b/src/OpenTK/Math/Vector4.cs @@ -172,37 +172,37 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Math/Vector4d.cs b/src/OpenTK/Math/Vector4d.cs index ec2ffb04..5351ab53 100644 --- a/src/OpenTK/Math/Vector4d.cs +++ b/src/OpenTK/Math/Vector4d.cs @@ -169,37 +169,37 @@ namespace OpenTK /// 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; } diff --git a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs index 1a6acca6..c19c9010 100644 --- a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs +++ b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs @@ -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; } diff --git a/src/OpenTK/Platform/Windows/WinRawMouse.cs b/src/OpenTK/Platform/Windows/WinRawMouse.cs index 09377604..99d9c62c 100644 --- a/src/OpenTK/Platform/Windows/WinRawMouse.cs +++ b/src/OpenTK/Platform/Windows/WinRawMouse.cs @@ -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"); diff --git a/src/OpenTK/Platform/X11/X11GLNative.cs b/src/OpenTK/Platform/X11/X11GLNative.cs index df838a44..c89883bc 100644 --- a/src/OpenTK/Platform/X11/X11GLNative.cs +++ b/src/OpenTK/Platform/X11/X11GLNative.cs @@ -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); }