Skip to content

Commit

Permalink
Remove EnumGetValues (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Charles Roddie <charles.roddie@summatic.co.uk>
  • Loading branch information
charlesroddie and Charles Roddie committed Dec 30, 2023
1 parent cf8fe8c commit 2d7dec9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions CSharpMath.Editor/SubIndexTypeMismatchException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ public class SubIndexTypeMismatchException : InvalidOperationException {
public SubIndexTypeMismatchException(Type atomType, MathListIndex index) : base(
$"{atomType} not found at index {index.AtomIndex}.") { }
public SubIndexTypeMismatchException(MathListIndex index) : base(
Array.IndexOf(typeof(MathListSubIndexType).GetEnumValues(), index.SubIndexType) == -1
? $"{index.SubIndexType} is an invalid subindex type."
: $"{index.SubIndexType} not found at index {index.AtomIndex}.") { }
$"{index.SubIndexType} not found at index {index.AtomIndex}.") { }
}
}

0 comments on commit 2d7dec9

Please sign in to comment.