Merge pull request #620 from Nihlus/cleanup-9-symbol-spacing
[Cleanup] Symbol Spacing
This commit is contained in:
commit
254f7e9bfb
23 changed files with 89 additions and 90 deletions
|
@ -20,7 +20,6 @@ namespace Bind.Structures
|
|||
/// Creates a new Parameter without type and name.
|
||||
/// </summary>
|
||||
public Parameter()
|
||||
:base()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -118,8 +118,8 @@ namespace OpenTK
|
|||
// or [StructLayout(LayoutKind.Explicit)]
|
||||
private static bool CheckStructLayoutAttribute(Type type)
|
||||
{
|
||||
StructLayoutAttribute[] attr = (StructLayoutAttribute[])
|
||||
type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
|
||||
StructLayoutAttribute[] attr =
|
||||
(StructLayoutAttribute[])type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
|
||||
|
||||
if ((attr == null) ||
|
||||
(attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1))
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace OpenTK
|
|||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is Box2 && Equals((Box2) obj);
|
||||
return obj is Box2 && Equals((Box2)obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenTK
|
|||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is Box2d && Equals((Box2d) obj);
|
||||
return obj is Box2d && Equals((Box2d)obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -306,7 +306,7 @@ namespace OpenTK
|
|||
}
|
||||
|
||||
private static unsafe int FloatToInt32Bits(float f) {
|
||||
return *((int*) &f);
|
||||
return *((int*)&f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace OpenTK
|
|||
/// </summary>
|
||||
/// <param name="eulerAngles">The euler angles as a Vector3</param>
|
||||
public Quaternion(Vector3 eulerAngles)
|
||||
:this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||
: this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace OpenTK
|
|||
/// </summary>
|
||||
/// <param name="eulerAngles">The euler angles as a Vector3d</param>
|
||||
public Quaterniond(Vector3d eulerAngles)
|
||||
:this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||
: this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -14,8 +14,8 @@ namespace OpenTK.Platform.Android
|
|||
/// <see cref="M:OpenTK.Platform.Android.AndroidGraphicsMode(Javax.Microedition.Khronos.Egl.EGLDisplay,int,OpenTK.Graphics.ColorFormat,int,int,int,int,bool)" />
|
||||
/// constructors (pass null to the display parameter for lazy initialization)
|
||||
/// </summary>
|
||||
public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo) :
|
||||
this(null, 1, color, depth, stencil, samples, buffers, stereo)
|
||||
public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo)
|
||||
: this(null, 1, color, depth, stencil, samples, buffers, stereo)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,8 @@ namespace OpenTK.Platform.Android
|
|||
/// </param>
|
||||
/// <param name="majorVersion">Requested OpenGL version (1 or 2)</param>
|
||||
/// <param name="mode">GraphicsMode to copy values from.</param>
|
||||
public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode) :
|
||||
this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
|
||||
public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode)
|
||||
: this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenTK.Platform.Egl
|
|||
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window,
|
||||
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
var angle_window = (IAngleWindowInfoInternal) window;
|
||||
var angle_window = (IAngleWindowInfoInternal)window;
|
||||
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
||||
var egl_context = new EglWinContext(mode, egl_window, shareContext, major, minor, flags);
|
||||
angle_window.EglContext = egl_context;
|
||||
|
@ -63,7 +63,7 @@ namespace OpenTK.Platform.Egl
|
|||
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window,
|
||||
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
var angle_window = (IAngleWindowInfoInternal) window;
|
||||
var angle_window = (IAngleWindowInfoInternal)window;
|
||||
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
||||
var egl_context = new EglWinContext(handle, egl_window, shareContext, major, minor, flags);
|
||||
angle_window.EglContext = egl_context;
|
||||
|
|
|
@ -152,12 +152,12 @@ namespace OpenTK.Platform.Egl
|
|||
{
|
||||
if (window is EglWindowInfo)
|
||||
{
|
||||
WindowInfo = (EglWindowInfo) window;
|
||||
WindowInfo = (EglWindowInfo)window;
|
||||
}
|
||||
#if !ANDROID
|
||||
else if (window is IAngleWindowInfoInternal)
|
||||
{
|
||||
WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
|
||||
WindowInfo = ((IAngleWindowInfoInternal)window).EglWindowInfo;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -263,9 +263,9 @@ namespace OpenTK.Platform.Egl
|
|||
var internalContext = sharedContext as IGraphicsContextInternal;
|
||||
if (internalContext != null)
|
||||
{
|
||||
return (EglContext) internalContext.Implementation;
|
||||
return (EglContext)internalContext.Implementation;
|
||||
}
|
||||
return (EglContext) sharedContext;
|
||||
return (EglContext)sharedContext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenTK.Platform.Egl
|
|||
IntPtr[] configs = new IntPtr[1];
|
||||
int[] attribList = new int[]
|
||||
{
|
||||
Egl.SURFACE_TYPE, (int) surfaceType,
|
||||
Egl.SURFACE_TYPE, (int)surfaceType,
|
||||
Egl.RENDERABLE_TYPE, (int)renderableFlags,
|
||||
|
||||
Egl.RED_SIZE, color.Red,
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace OpenTK.Platform.Egl
|
|||
public void CreateWindowSurface(IntPtr config)
|
||||
{
|
||||
Surface = Egl.CreateWindowSurface(Display, config, Handle, IntPtr.Zero);
|
||||
if (Surface==IntPtr.Zero)
|
||||
if (Surface == IntPtr.Zero)
|
||||
{
|
||||
throw new GraphicsContextException(String.Format(
|
||||
"[EGL] Failed to create window surface, error {0}.", Egl.GetError()));
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace OpenTK.Platform.Linux
|
|||
MT_TOOL_Y = 0x3d, /* Center Y tool position */
|
||||
|
||||
MAX = 0x3f,
|
||||
CNT = (MAX+1),
|
||||
CNT = (MAX + 1),
|
||||
}
|
||||
|
||||
internal enum EvdevButton
|
||||
|
@ -579,7 +579,7 @@ namespace OpenTK.Platform.Linux
|
|||
PWR = 0x16,
|
||||
FF_STATUS = 0x17,
|
||||
MAX = 0x1f,
|
||||
CNT = (MAX+1),
|
||||
CNT = (MAX + 1),
|
||||
}
|
||||
|
||||
internal enum EvdevIoctl : uint
|
||||
|
|
|
@ -3326,7 +3326,7 @@ namespace OpenTK.Platform.Windows
|
|||
/*
|
||||
* NEC PC-9800 kbd definitions
|
||||
*/
|
||||
OEM_NEC_EQUAL= 0x92, // '=' key on numpad
|
||||
OEM_NEC_EQUAL = 0x92, // '=' key on numpad
|
||||
|
||||
/*
|
||||
* Fujitsu/OASYS kbd definitions
|
||||
|
|
|
@ -426,8 +426,8 @@ namespace OpenTK.Platform.Windows
|
|||
{
|
||||
if (stick.AxisCaps[i].LogicalMin > 0)
|
||||
{
|
||||
short scaled_value = (short) HidHelper.ScaleValue(
|
||||
(int) ((long) value + stick.AxisCaps[i].LogicalMin),
|
||||
short scaled_value = (short)HidHelper.ScaleValue(
|
||||
(int)((long)value + stick.AxisCaps[i].LogicalMin),
|
||||
stick.AxisCaps[i].LogicalMin, stick.AxisCaps[i].LogicalMax,
|
||||
Int16.MinValue, Int16.MaxValue);
|
||||
stick.SetAxis(collection, page, usage, scaled_value);
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenTK.Platform.Windows
|
|||
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
|
||||
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;
|
||||
deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(deviceDesc))
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace OpenTK.Platform.Windows
|
|||
// Added to address OpenTK issue 3198 with mouse on Windows 8
|
||||
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");
|
||||
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
||||
deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
|
||||
}
|
||||
|
||||
// deviceDesc remained null on a new Win7 system - not sure why.
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenTK.Platform.Windows
|
|||
{
|
||||
XInputButtons dir = 0;
|
||||
|
||||
dir =XInputButtons.DPadUp | XInputButtons.DPadLeft;
|
||||
dir = XInputButtons.DPadUp | XInputButtons.DPadLeft;
|
||||
if ((buttons & dir) == dir)
|
||||
{
|
||||
return HatPosition.UpLeft;
|
||||
|
|
|
@ -677,7 +677,7 @@ XF86VidModeGetGammaRampSize(
|
|||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format("MotifWmHints <flags={0}, functions={1}, decorations={2}, input_mode={3}, status={4}", (MotifFlags) flags.ToInt32 (), (MotifFunctions) functions.ToInt32 (), (MotifDecorations) decorations.ToInt32 (), (MotifInputMode) input_mode.ToInt32 (), status.ToInt32 ());
|
||||
return string.Format("MotifWmHints <flags={0}, functions={1}, decorations={2}, input_mode={3}, status={4}", (MotifFlags)flags.ToInt32 (), (MotifFunctions)functions.ToInt32 (), (MotifDecorations)decorations.ToInt32 (), (MotifInputMode)input_mode.ToInt32 (), status.ToInt32 ());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -764,26 +764,26 @@ XF86VidModeGetGammaRampSize(
|
|||
|
||||
internal enum WindowState
|
||||
{
|
||||
Sticky = (1<<0), /* everyone knows sticky */
|
||||
Minimized = (1<<1), /* ??? */
|
||||
MaximizedVertically = (1<<2), /* window in maximized V state */
|
||||
MaximizedHorizontally = (1<<3), /* window in maximized H state */
|
||||
Hidden = (1<<4), /* not on taskbar but window visible */
|
||||
Shaded = (1<<5), /* shaded (NeXT style), */
|
||||
HID_WORKSPACE = (1<<6), /* not on current desktop */
|
||||
HID_TRANSIENT = (1<<7), /* owner of transient is hidden */
|
||||
FixedPosition = (1<<8), /* window is fixed in position even */
|
||||
ArrangeIgnore = (1<<9), /* ignore for auto arranging */
|
||||
Sticky = (1 << 0), /* everyone knows sticky */
|
||||
Minimized = (1 << 1), /* ??? */
|
||||
MaximizedVertically = (1 << 2), /* window in maximized V state */
|
||||
MaximizedHorizontally = (1 << 3), /* window in maximized H state */
|
||||
Hidden = (1 << 4), /* not on taskbar but window visible */
|
||||
Shaded = (1 << 5), /* shaded (NeXT style), */
|
||||
HID_WORKSPACE = (1 << 6), /* not on current desktop */
|
||||
HID_TRANSIENT = (1 << 7), /* owner of transient is hidden */
|
||||
FixedPosition = (1 << 8), /* window is fixed in position even */
|
||||
ArrangeIgnore = (1 << 9), /* ignore for auto arranging */
|
||||
}
|
||||
|
||||
internal enum WindowHints
|
||||
{
|
||||
SkipFocus = (1<<0), /* "alt-tab" skips this win */
|
||||
SkipWinlist = (1<<1), /* not in win list */
|
||||
SkipTaskbar = (1<<2), /* not on taskbar */
|
||||
GroupTransient = (1<<3), /* ??????? */
|
||||
FocusOnClick = (1<<4), /* app only accepts focus when clicked */
|
||||
DoNotCover = (1<<5), /* attempt to not cover this window */
|
||||
SkipFocus = (1 << 0), /* "alt-tab" skips this win */
|
||||
SkipWinlist = (1 << 1), /* not in win list */
|
||||
SkipTaskbar = (1 << 2), /* not on taskbar */
|
||||
GroupTransient = (1 << 3), /* ??????? */
|
||||
FocusOnClick = (1 << 4), /* app only accepts focus when clicked */
|
||||
DoNotCover = (1 << 5), /* attempt to not cover this window */
|
||||
}
|
||||
|
||||
internal enum ErrorCodes : int
|
||||
|
@ -811,28 +811,28 @@ XF86VidModeGetGammaRampSize(
|
|||
[Flags]
|
||||
internal enum CreateWindowMask : long//: ulong
|
||||
{
|
||||
CWBackPixmap = (1L<<0),
|
||||
CWBackPixel = (1L<<1),
|
||||
CWSaveUnder = (1L<<10),
|
||||
CWEventMask = (1L<<11),
|
||||
CWDontPropagate = (1L<<12),
|
||||
CWColormap = (1L<<13),
|
||||
CWCursor = (1L<<14),
|
||||
CWBorderPixmap = (1L<<2),
|
||||
CWBorderPixel = (1L<<3),
|
||||
CWBitGravity = (1L<<4),
|
||||
CWWinGravity = (1L<<5),
|
||||
CWBackingStore = (1L<<6),
|
||||
CWBackingPlanes = (1L<<7),
|
||||
CWBackingPixel = (1L<<8),
|
||||
CWOverrideRedirect = (1L<<9),
|
||||
CWBackPixmap = (1L << 0),
|
||||
CWBackPixel = (1L << 1),
|
||||
CWSaveUnder = (1L << 10),
|
||||
CWEventMask = (1L << 11),
|
||||
CWDontPropagate = (1L << 12),
|
||||
CWColormap = (1L << 13),
|
||||
CWCursor = (1L << 14),
|
||||
CWBorderPixmap = (1L << 2),
|
||||
CWBorderPixel = (1L << 3),
|
||||
CWBitGravity = (1L << 4),
|
||||
CWWinGravity = (1L << 5),
|
||||
CWBackingStore = (1L << 6),
|
||||
CWBackingPlanes = (1L << 7),
|
||||
CWBackingPixel = (1L << 8),
|
||||
CWOverrideRedirect = (1L << 9),
|
||||
|
||||
//CWY = (1<<1),
|
||||
//CWWidth = (1<<2),
|
||||
//CWHeight = (1<<3),
|
||||
//CWBorderWidth = (1<<4),
|
||||
//CWSibling = (1<<5),
|
||||
//CWStackMode = (1<<6),
|
||||
//CWY = (1 << 1),
|
||||
//CWWidth = (1 << 2),
|
||||
//CWHeight = (1 << 3),
|
||||
//CWBorderWidth = (1 << 4),
|
||||
//CWSibling = (1 << 5),
|
||||
//CWStackMode = (1 << 6),
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1197,7 +1197,7 @@ XF86VidModeGetGammaRampSize(
|
|||
XF86AudioPrev = 0x1008ff16,
|
||||
XF86AudioNext = 0x1008ff17,
|
||||
XF86AudioRecord = 0x1008ff1c,
|
||||
XF86AudioPause =0x1008ff31,
|
||||
XF86AudioPause = 0x1008ff31,
|
||||
XF86AudioRewind = 0x1008ff3e,
|
||||
XF86AudioForward = 0x1008ff97,
|
||||
XF86Phone = 0x1008ff6e,
|
||||
|
|
|
@ -553,7 +553,7 @@ namespace OpenTK.Platform.X11
|
|||
public byte A, R, G, B;
|
||||
public Pixel(byte a, byte r, byte g, byte b)
|
||||
{
|
||||
A= a;
|
||||
A = a;
|
||||
R = r;
|
||||
G = g;
|
||||
B = b;
|
||||
|
@ -602,7 +602,7 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
for (int x = 0; x < width; ++x)
|
||||
{
|
||||
byte bit = (byte) (1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
|
||||
byte bit = (byte)(1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
|
||||
int offset = y * stride + (x >> 3);
|
||||
|
||||
if (image.GetPixel(x, y).A >= 128)
|
||||
|
|
|
@ -1050,21 +1050,21 @@ namespace OpenTK.Platform.X11
|
|||
Sibling = 1 << 5,
|
||||
StackMode = 1 << 6,
|
||||
|
||||
//BackPixmap (1L<<0)
|
||||
//BackPixel (1L<<1)
|
||||
//SaveUnder (1L<<10)
|
||||
//EventMask (1L<<11)
|
||||
//DontPropagate (1L<<12)
|
||||
//Colormap (1L<<13)
|
||||
//Cursor (1L<<14)
|
||||
//BorderPixmap (1L<<2)
|
||||
//BorderPixel (1L<<3)
|
||||
//BitGravity (1L<<4)
|
||||
//WinGravity (1L<<5)
|
||||
//BackingStore (1L<<6)
|
||||
//BackingPlanes (1L<<7)
|
||||
//BackingPixel (1L<<8)
|
||||
OverrideRedirect = 1<<9,
|
||||
//BackPixmap (1L << 0)
|
||||
//BackPixel (1L << 1)
|
||||
//SaveUnder (1L << 10)
|
||||
//EventMask (1L << 11)
|
||||
//DontPropagate (1L << 12)
|
||||
//Colormap (1L << 13)
|
||||
//Cursor (1L << 14)
|
||||
//BorderPixmap (1L << 2)
|
||||
//BorderPixel (1L << 3)
|
||||
//BitGravity (1L << 4)
|
||||
//WinGravity (1L << 5)
|
||||
//BackingStore (1L << 6)
|
||||
//BackingPlanes (1L << 7)
|
||||
//BackingPixel (1L << 8)
|
||||
OverrideRedirect = 1 << 9,
|
||||
}
|
||||
|
||||
internal enum StackMode
|
||||
|
@ -1816,7 +1816,7 @@ namespace OpenTK.Platform.X11
|
|||
mask = (byte*)Marshal.AllocHGlobal(mask_len);
|
||||
for (int i = 0; i < mask_len; i++)
|
||||
{
|
||||
mask[i] = (byte)((uint)m >> i*8);
|
||||
mask[i] = (byte)((uint)m >> i * 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace OpenTK.Platform.X11
|
|||
deviceToScreen.Add(dev, 0 /*screen.ScreenNumber*/);
|
||||
}
|
||||
}
|
||||
return (devices.Count>0);
|
||||
return (devices.Count > 0);
|
||||
}
|
||||
|
||||
private bool QueryXRandR(List<DisplayDevice> devices)
|
||||
|
@ -356,7 +356,7 @@ namespace OpenTK.Platform.X11
|
|||
screen, current_resolution_index, new_resolution_index);
|
||||
|
||||
int ret = 0;
|
||||
short refresh_rate =(short)(resolution != null ? resolution.RefreshRate : 0);
|
||||
short refresh_rate = (short)(resolution != null ? resolution.RefreshRate : 0);
|
||||
if (refresh_rate > 0)
|
||||
{
|
||||
ret = Functions.XRRSetScreenConfigAndRate(API.DefaultDisplay,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly -->
|
||||
<Rule Id="SA1001" Action="Error" /> <!-- Commas must be spaced correctly -->
|
||||
<Rule Id="SA1002" Action="Error" /> <!-- Semicolons must be spaced correctly -->
|
||||
<Rule Id="SA1003" Action="None" /> <!-- Symbols must be spaced correctly -->
|
||||
<Rule Id="SA1003" Action="Error" /> <!-- Symbols must be spaced correctly -->
|
||||
<Rule Id="SA1004" Action="None" /> <!-- Documentation lines must begin with single space -->
|
||||
<Rule Id="SA1005" Action="None" /> <!-- Single line comments must begin with single space -->
|
||||
<Rule Id="SA1006" Action="Error" /> <!-- Preprocessor keywords must not be preceded by space -->
|
||||
|
|
Loading…
Reference in a new issue