From f579d0fd811a8f3e629e03064cd32569b5ea6d51 Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Sun, 15 Dec 2013 22:02:08 +0100 Subject: [PATCH] Eliminated cls-compliance warnings in the math library --- Source/OpenTK/Math/Quaternion.cs | 3 ++- Source/OpenTK/Math/Vector2.cs | 3 +++ Source/OpenTK/Math/Vector2d.cs | 3 +++ Source/OpenTK/Math/Vector2h.cs | 2 ++ Source/OpenTK/Math/Vector3.cs | 3 +++ Source/OpenTK/Math/Vector3d.cs | 5 ++++- Source/OpenTK/Math/Vector3h.cs | 3 +++ Source/OpenTK/Math/Vector4.cs | 3 +++ Source/OpenTK/Math/Vector4d.cs | 3 +++ Source/OpenTK/Math/Vector4h.cs | 2 ++ 10 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Math/Quaternion.cs b/Source/OpenTK/Math/Quaternion.cs index 5913e1dd..1334ea09 100644 --- a/Source/OpenTK/Math/Quaternion.cs +++ b/Source/OpenTK/Math/Quaternion.cs @@ -77,14 +77,15 @@ namespace OpenTK /// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance. /// [Obsolete("Use Xyz property instead.")] - [CLSCompliant(false)] [EditorBrowsable(EditorBrowsableState.Never)] [XmlIgnore] + [CLSCompliant(false)] public Vector3 XYZ { get { return Xyz; } set { Xyz = value; } } /// /// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance. /// + [CLSCompliant(false)] public Vector3 Xyz { get { return xyz; } set { xyz = value; } } /// diff --git a/Source/OpenTK/Math/Vector2.cs b/Source/OpenTK/Math/Vector2.cs index 1ccc885e..e4bb0dcf 100644 --- a/Source/OpenTK/Math/Vector2.cs +++ b/Source/OpenTK/Math/Vector2.cs @@ -131,6 +131,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector2 right) { @@ -154,6 +155,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector2 right) { @@ -343,6 +345,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. + [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] public void Scale(Vector2 scale) { diff --git a/Source/OpenTK/Math/Vector2d.cs b/Source/OpenTK/Math/Vector2d.cs index 76140079..4b772b9c 100644 --- a/Source/OpenTK/Math/Vector2d.cs +++ b/Source/OpenTK/Math/Vector2d.cs @@ -114,6 +114,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector2d right) { @@ -137,6 +138,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector2d right) { @@ -290,6 +292,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. + [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] public void Scale(Vector2d scale) { diff --git a/Source/OpenTK/Math/Vector2h.cs b/Source/OpenTK/Math/Vector2h.cs index 57ab67ad..85ec2805 100644 --- a/Source/OpenTK/Math/Vector2h.cs +++ b/Source/OpenTK/Math/Vector2h.cs @@ -150,6 +150,7 @@ namespace OpenTK /// The new Half2 instance will convert the Vector2d into 16-bit half-precision floating-point. /// /// OpenTK.Vector2d + [CLSCompliant(false)] public Vector2h(Vector2d v) { X = new Half(v.X); @@ -161,6 +162,7 @@ namespace OpenTK /// /// OpenTK.Vector2d /// Enable checks that will throw if the conversion result is not meaningful. + [CLSCompliant(false)] public Vector2h(Vector2d v, bool throwOnError) { X = new Half(v.X, throwOnError); diff --git a/Source/OpenTK/Math/Vector3.cs b/Source/OpenTK/Math/Vector3.cs index 8ec3565d..d5d2d39d 100644 --- a/Source/OpenTK/Math/Vector3.cs +++ b/Source/OpenTK/Math/Vector3.cs @@ -143,6 +143,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector3 right) { @@ -168,6 +169,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector3 right) { @@ -335,6 +337,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. + [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] public void Scale(Vector3 scale) { diff --git a/Source/OpenTK/Math/Vector3d.cs b/Source/OpenTK/Math/Vector3d.cs index 70acdb88..df707c00 100644 --- a/Source/OpenTK/Math/Vector3d.cs +++ b/Source/OpenTK/Math/Vector3d.cs @@ -141,6 +141,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector3d right) { @@ -166,6 +167,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector3d right) { @@ -335,6 +337,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. [Obsolete("Use static Multiply() method instead.")] + [CLSCompliant(false)] public void Scale(Vector3d scale) { this.X *= scale.X; @@ -344,8 +347,8 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. - [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] + [CLSCompliant(false)] public void Scale(ref Vector3d scale) { this.X *= scale.X; diff --git a/Source/OpenTK/Math/Vector3h.cs b/Source/OpenTK/Math/Vector3h.cs index ec910cdc..52945c6d 100644 --- a/Source/OpenTK/Math/Vector3h.cs +++ b/Source/OpenTK/Math/Vector3h.cs @@ -155,6 +155,7 @@ namespace OpenTK /// /// OpenTK.Vector3 /// Enable checks that will throw if the conversion result is not meaningful. + [CLSCompliant(false)] public Vector3h(ref Vector3 v, bool throwOnError) { X = new Half(v.X, throwOnError); @@ -166,6 +167,7 @@ namespace OpenTK /// The new Half3 instance will convert the Vector3d into 16-bit half-precision floating-point. /// /// OpenTK.Vector3d + [CLSCompliant(false)] public Vector3h(Vector3d v) { X = new Half(v.X); @@ -178,6 +180,7 @@ namespace OpenTK /// /// OpenTK.Vector3d /// Enable checks that will throw if the conversion result is not meaningful. + [CLSCompliant(false)] public Vector3h(Vector3d v, bool throwOnError) { X = new Half(v.X, throwOnError); diff --git a/Source/OpenTK/Math/Vector4.cs b/Source/OpenTK/Math/Vector4.cs index 5cb57992..b0e6b1fd 100644 --- a/Source/OpenTK/Math/Vector4.cs +++ b/Source/OpenTK/Math/Vector4.cs @@ -203,6 +203,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector4 right) { @@ -230,6 +231,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector4 right) { @@ -405,6 +407,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. + [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] public void Scale(Vector4 scale) { diff --git a/Source/OpenTK/Math/Vector4d.cs b/Source/OpenTK/Math/Vector4d.cs index 6389e48b..c7d0c0e3 100644 --- a/Source/OpenTK/Math/Vector4d.cs +++ b/Source/OpenTK/Math/Vector4d.cs @@ -201,6 +201,7 @@ namespace OpenTK /// Add the Vector passed as parameter to this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Add() method instead.")] public void Add(Vector4d right) { @@ -228,6 +229,7 @@ namespace OpenTK /// Subtract the Vector passed as parameter from this instance. /// Right operand. This parameter is only read from. + [CLSCompliant(false)] [Obsolete("Use static Subtract() method instead.")] public void Sub(Vector4d right) { @@ -402,6 +404,7 @@ namespace OpenTK /// Scales this instance by the given parameter. /// The scaling of the individual components. + [CLSCompliant(false)] [Obsolete("Use static Multiply() method instead.")] public void Scale(Vector4d scale) { diff --git a/Source/OpenTK/Math/Vector4h.cs b/Source/OpenTK/Math/Vector4h.cs index 26e547fb..d9499f73 100644 --- a/Source/OpenTK/Math/Vector4h.cs +++ b/Source/OpenTK/Math/Vector4h.cs @@ -181,6 +181,7 @@ namespace OpenTK /// The new Half4 instance will convert the Vector4d into 16-bit half-precision floating-point. /// /// OpenTK.Vector4d + [CLSCompliant(false)] public Vector4h(Vector4d v) { X = new Half(v.X); @@ -194,6 +195,7 @@ namespace OpenTK /// /// OpenTK.Vector4d /// Enable checks that will throw if the conversion result is not meaningful. + [CLSCompliant(false)] public Vector4h(Vector4d v, bool throwOnError) { X = new Half(v.X, throwOnError);