Skip to content

Commit bad5d40

Browse files
committed
Use shorthand property syntax and clean up the radial distortion file.
1 parent 16e6b12 commit bad5d40

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

OSVR-Unity/Assets/OSVRUnity/src/K1RadialDistortion.cs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
/// limitations under the License.
1919
/// </copyright>
2020
/// <summary>
21-
/// Long ago, based on Unity's (Pro Only) Image Effect: Fisheye.js
22-
/// Author: Greg Aring
21+
/// Author: Greg Aring, Ryan Pavlik
2322
/// Email: greg@sensics.com
2423
/// </summary>
2524
using UnityEngine;
@@ -52,18 +51,10 @@ public class K1RadialDistortionFactory
5251

5352
public bool Supported
5453
{
55-
get
56-
{
57-
return _supported;
58-
}
59-
private set
60-
{
61-
_supported = value;
62-
}
54+
get;
55+
private set;
6356
}
6457

65-
private bool _supported = false;
66-
6758
private Shader DistortionShader;
6859

6960
public K1RadialDistortionFactory()
@@ -85,7 +76,8 @@ public K1RadialDistortion GetOrCreateDistortion(OSVR.Unity.VREye eye)
8576
K1RadialDistortion ret = eye.DistortionEffect;
8677
if (!Supported)
8778
{
88-
if (ret) {
79+
if (ret)
80+
{
8981
// shouldn't be able to get here but...
9082
ret.enabled = false;
9183
ret = null;
@@ -144,4 +136,4 @@ private static bool IsMinimallyCompatible
144136
}
145137
}
146138
}
147-
}
139+
}

0 commit comments

Comments
 (0)