Correct cast operator position.

This commit is contained in:
Jarl Gullberg 2017-07-30 17:47:43 +02:00
parent af3aef4d9e
commit 5db88e0a8f
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -118,8 +118,8 @@ namespace OpenTK
// or [StructLayout(LayoutKind.Explicit)] // or [StructLayout(LayoutKind.Explicit)]
private static bool CheckStructLayoutAttribute(Type type) private static bool CheckStructLayoutAttribute(Type type)
{ {
StructLayoutAttribute[] attr = (StructLayoutAttribute[]) StructLayoutAttribute[] attr =
type.GetCustomAttributes(typeof(StructLayoutAttribute), true); (StructLayoutAttribute[])type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
if ((attr == null) || if ((attr == null) ||
(attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1)) (attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1))