Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvk committed Jan 23, 2017
1 parent 0c2120b commit 94e09db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CodeJam.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EClosureAllocation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EObjectAllocation_002EEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InvertIf/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InvocationIsSkipped/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=LoopCanBeConvertedToQuery/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantArgumentDefaultValue/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ReturnTypeCanBeEnumerable_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
Expand Down
1 change: 1 addition & 0 deletions Main/src/Ranges/CompositeRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace CodeJam.Ranges
{
/// <summary>Helper methods for the <seealso cref="CompositeRange{T}"/>.</summary>
[PublicAPI]
public static partial class CompositeRange
{
/// <summary>Creates the composite range.</summary>
Expand Down
4 changes: 2 additions & 2 deletions Main/src/Ranges/Range.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static Range<T> TryCreate<T>(RangeBoundaryFrom<T> from, RangeBoundaryTo<T
private static Range<T> TryCreateCore<T>(
T from, RangeBoundaryFromKind fromKind,
T to, RangeBoundaryToKind toKind) =>
(RangeBoundaryFrom<T>.IsValid(from) && RangeBoundaryTo<T>.IsValid(to))
RangeBoundaryFrom<T>.IsValid(from) && RangeBoundaryTo<T>.IsValid(to)
? TryCreate(
RangeBoundaryFrom<T>.AdjustAndCreate(from, fromKind),
RangeBoundaryTo<T>.AdjustAndCreate(to, toKind))
Expand All @@ -226,7 +226,7 @@ private static Range<T, TKey> TryCreateCore<T, TKey>(
T from, RangeBoundaryFromKind fromKind,
T to, RangeBoundaryToKind toKind,
TKey key) =>
(RangeBoundaryFrom<T>.IsValid(from) && RangeBoundaryTo<T>.IsValid(to))
RangeBoundaryFrom<T>.IsValid(from) && RangeBoundaryTo<T>.IsValid(to)
? TryCreate(
RangeBoundaryFrom<T>.AdjustAndCreate(from, fromKind),
RangeBoundaryTo<T>.AdjustAndCreate(to, toKind),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public static partial class ReflectionExtensions
private sealed class TypeTypeHandleComparer : IEqualityComparer<Type>
{
public bool Equals(Type x, Type y) =>
x == null ? y == null : (y != null && x.TypeHandle.Equals(y.TypeHandle));
x == null ? y == null : y != null && x.TypeHandle.Equals(y.TypeHandle);

public int GetHashCode(Type obj) => obj?.TypeHandle.GetHashCode() ?? 0;
}

private sealed class MethodMethodHandleComparer : IEqualityComparer<MethodInfo>
{
public bool Equals(MethodInfo x, MethodInfo y) =>
x == null ? y == null : (y != null && x.MethodHandle.Equals(y.MethodHandle));
x == null ? y == null : y != null && x.MethodHandle.Equals(y.MethodHandle);

public int GetHashCode(MethodInfo obj) => obj?.MethodHandle.GetHashCode() ?? 0;
}
Expand Down

0 comments on commit 94e09db

Please sign in to comment.