Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Commit 8c2646f

Browse files
Added .editorconfig to help keep project in compliance with coding guidelines (#818)
1 parent 43fa762 commit 8c2646f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

Runtime/Extensions/UnityObjectExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public static class UnityObjectExtensions
1818
public static void DontDestroyOnLoad(this Object @object)
1919
{
2020
#if UNITY_EDITOR
21+
// ReSharper disable once EnforceIfStatementBraces
2122
if (UnityEditor.EditorApplication.isPlaying)
2223
#endif
2324
Object.DontDestroyOnLoad(@object);

Runtime/Utilities/Lines/DataProviders/BezierLineDataProvider.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ protected override void SetPointInternal(int pointIndex, Vector3 point)
145145
localOffset = Vector3.zero;
146146
// If we're using local tangent points, apply this change to control point 2
147147
if (useLocalTangentPoints)
148+
{
148149
localOffset = point - controlPoints.Point1;
150+
}
149151

150152
controlPoints.Point1 = point;
151-
controlPoints.Point2 = controlPoints.Point2 + localOffset;
153+
controlPoints.Point2 += localOffset;
152154
break;
153155
case 1:
154156
controlPoints.Point2 = point;
@@ -164,7 +166,7 @@ protected override void SetPointInternal(int pointIndex, Vector3 point)
164166
}
165167

166168
controlPoints.Point4 = point;
167-
controlPoints.Point3 = controlPoints.Point3 + localOffset;
169+
controlPoints.Point3 += localOffset;
168170
break;
169171
}
170172
}
@@ -195,4 +197,4 @@ protected override Vector3 GetUpVectorInternal(float normalizedLength)
195197
return transform.up;
196198
}
197199
}
198-
}
200+
}

Runtime/Utilities/MathUtilities.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ public static Vector3 NearestPointToLinesRANSAC(List<Ray> rays, int ransac_itera
357357
for (int ind = 0; ind < rays.Count; ++ind)
358358
{
359359
if (DistanceOfPointToLine(rays[ind], testPoint) < ransac_threshold)
360+
{
360361
++numInliersForIteration;
362+
}
361363
}
362364

363365
// remember best
@@ -454,4 +456,4 @@ public static float GetAngleBetween(Vector2 pointA, Vector2 pointB)
454456
return MathUtilities.RadiansToDegrees(Mathf.Atan2(diff.y, diff.x));
455457
}
456458
}
457-
}
459+
}

Tests/Services/ITestExtensionDataProvider1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace XRTK.Tests.Services
77
{
8-
interface ITestExtensionDataProvider1 : IMixedRealityExtensionDataProvider, ITestService { }
8+
internal interface ITestExtensionDataProvider1 : IMixedRealityExtensionDataProvider, ITestService { }
99

10-
interface ITestExtensionDataProvider2 : IMixedRealityExtensionDataProvider, ITestService { }
11-
}
10+
internal interface ITestExtensionDataProvider2 : IMixedRealityExtensionDataProvider, ITestService { }
11+
}

0 commit comments

Comments
 (0)