Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Exanite committed Jul 4, 2024
1 parent a3ebf38 commit ce74820
Show file tree
Hide file tree
Showing 42 changed files with 85 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Components/RunApplicationInBackground.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ private void Start()
Application.runInBackground = true;
}
}
}
}
2 changes: 1 addition & 1 deletion Components/SelectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ namespace Exanite.Core.Components
{
[SelectionBase]
public class SelectionBase : MonoBehaviour {}
}
}
2 changes: 1 addition & 1 deletion Components/SingletonBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ private void Initialize()
}
}
}
}
}
2 changes: 1 addition & 1 deletion Components/UiScaleHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ private void Update()
}
}
}
}
}
2 changes: 1 addition & 1 deletion Events/EventBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ void IAnyEventListener.OnAnyEvent<T>(T e)
Publish(e);
}
}
}
}
2 changes: 1 addition & 1 deletion Events/EventRaisedRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public void OnEventRaised()
IsRaised = true;
}
}
}
}
2 changes: 1 addition & 1 deletion Events/IAnyEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ public interface IAnyEventListener
{
void OnAnyEvent<T>(T e);
}
}
}
2 changes: 1 addition & 1 deletion Events/IEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ public interface IEventListener<in T>
{
void OnEvent(T e);
}
}
}
2 changes: 1 addition & 1 deletion Interpolation/Interpolator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public void PushNext(T next, float time)

public abstract T Lerp(T previous, T current, float time);
}
}
}
2 changes: 1 addition & 1 deletion Numerics/LargeNumber.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETCOREAPP
#if NETCOREAPP || UNITY_2021_3_OR_NEWER
using System;
using System.Globalization;
using Exanite.Core.Utilities;
Expand Down
5 changes: 3 additions & 2 deletions Numerics/NumScalesShort.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ReSharper disable InconsistentNaming
using System;
using System;

namespace Exanite.Core.Numerics
{
Expand All @@ -11,6 +10,8 @@ public enum NumScalesShort
{
// Scales found at https://en.wikipedia.org/wiki/Names_of_large_numbers

// ReSharper disable InconsistentNaming

None = 0,
K = 1,
M = 2,
Expand Down
4 changes: 1 addition & 3 deletions Numerics/Vector2Int.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if NETCOREAPP
#if !UNITY_2021_3_OR_NEWER
#if NETCOREAPP && !UNITY_2021_3_OR_NEWER
using System;
using System.Numerics;

Expand Down Expand Up @@ -96,4 +95,3 @@ public string ToString(string format, IFormatProvider formatProvider)
}
}
#endif
#endif
4 changes: 1 addition & 3 deletions Numerics/Vector3Int.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if NETCOREAPP
#if !UNITY_2021_3_OR_NEWER
#if NETCOREAPP && !UNITY_2021_3_OR_NEWER
using System;
using System.Numerics;

Expand Down Expand Up @@ -105,4 +104,3 @@ public string ToString(string format, IFormatProvider formatProvider)
}
}
#endif
#endif
5 changes: 3 additions & 2 deletions Numerics/Vector3Swizzle.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ReSharper disable InconsistentNaming
using System;
using System;

namespace Exanite.Core.Numerics
{
Expand All @@ -9,6 +8,8 @@ namespace Exanite.Core.Numerics
[Serializable]
public enum Vector3Swizzle
{
// ReSharper disable InconsistentNaming

/// <summary>
/// Keeps the component positions at XYZ.
/// </summary>
Expand Down
8 changes: 7 additions & 1 deletion Pooling.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Pooling/CollectionPool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using System.Collections.Generic;

namespace Exanite.Core.Pooling
Expand Down
11 changes: 10 additions & 1 deletion Pooling/CollectionPool.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Pooling/Pool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using System;
using System.Collections.Generic;

Expand Down
11 changes: 10 additions & 1 deletion Pooling/Pool.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Pooling/PoolHandle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using System;

namespace Exanite.Core.Pooling
Expand Down
11 changes: 10 additions & 1 deletion Pooling/PoolHandle.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Properties/PropertyNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public PropertyNotFoundException(PropertyDefinition definition)
Definition = definition;
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/PropertyTypeMismatchException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public PropertyTypeMismatchException(Type existingType, Type requestedType)
RequestedType = requestedType;
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/PropertyValueChangedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public PropertyValueChangedEventArgs(Property property)
public T PreviousValue { get; set; }
public T NewValue { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/IPropertyValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ public interface IPropertyValidator
{
public bool Validate(Property property);
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/PropertyCollectionSchemaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public PropertyCollectionSchema Build()
return new PropertyCollectionSchema(entries);
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/PropertyCollectionSchemaEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public PropertyCollectionSchemaEntry(PropertyDefinition definition, bool isRequi

public List<IPropertyValidator> PropertyValidators { get; }
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/PropertyCollectionSchemaEntryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ public PropertyCollectionSchemaEntry Build()
return new PropertyCollectionSchemaEntry(definition, isRequired, propertyValidators);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace Exanite.Core.Properties.Schemas
{
public class PropertyCollectionSchemaValidationError
Expand All @@ -17,4 +15,4 @@ public PropertyCollectionSchemaValidationError(PropertyCollectionSchemaEntry ent

public PropertyDefinition Definition => Entry.Definition;
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/PropertyTypeValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public bool Validate(Property property)
return property.Type == ExpectedType;
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/PropertyValueNotNullValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public bool Validate(Property property)
return property.UntypedValue != null;
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/Schemas/RequiredPropertyValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public bool Validate(Property property)
return property != null;
}
}
}
}
2 changes: 1 addition & 1 deletion Tests/Editor/Properties/PropertyCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ public void GetOrAddProperty_WhenCalledTwiceWithDifferentTypes_ThrowsException()
});
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ public void Validate_WhenCollectionHasPropertyOfWrongType_ReturnsFalse()
Assert.IsFalse(schema.Validate(collection));
}
}
}
}
2 changes: 1 addition & 1 deletion Types/ITypeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public interface ITypeFilter
{
public IEnumerable<Type> Filter(Type type);
}
}
}
2 changes: 1 addition & 1 deletion Types/InterfaceTypeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public IEnumerable<Type> Filter(Type type)
return type.GetInterfaces();
}
}
}
}
2 changes: 1 addition & 1 deletion Types/SelfTypeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public IEnumerable<Type> Filter(Type type)
yield return type;
}
}
}
}
11 changes: 10 additions & 1 deletion Utilities/ColorUtility.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Utilities/DisposeUtility.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

#if NETCOREAPP
using System;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion Utilities/ExceptionUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public static NotSupportedException NotSupportedEnumValue<T>(T value) where T :
return new NotSupportedException($"{value} is not a supported {typeof(T)}.");
}
}
}
}
3 changes: 2 additions & 1 deletion Utilities/MathUtility.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
// ReSharper disable once RedundantUsingDirective - Using statements can be unused due to conditional compilation
using System;

namespace Exanite.Core.Utilities
{
Expand Down
1 change: 1 addition & 0 deletions Utilities/VectorUtility.Unity.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
#if UNITY_2021_3_OR_NEWER
using Exanite.Core.Numerics;
using UnityEngine;
Expand Down

0 comments on commit ce74820

Please sign in to comment.