-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove compiler conditions #288
Conversation
@@ -77,7 +77,7 @@ public void Execute(float delta, PathsF solution) | |||
this.ExecuteInternal(delta); | |||
if (this.groupList.Count == 0) | |||
{ | |||
goto Error; | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted this when trying to run a benchmark. I'd deviated from clippers default behavior for some reason.
@@ -1,6 +1,7 @@ | |||
// Copyright (c) Six Labors. | |||
// Licensed under the Six Labors Split License. | |||
|
|||
using System.Numerics; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antonfirsov I spotted this comment. Are we able to replace this code with built in APIs now?
// Adapted from:
// https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.cs
// If targeting .NET 5, we can call span based sort, but probably not worth it only for that API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can now delete SortUtility
and use span.Sort(...)
overloads instead in PolygonScanner and friends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks! I didn't even know about the additional sort APIs. Removed.
Codecov Report
@@ Coverage Diff @@
## main #288 +/- ##
====================================
Coverage 80% 80%
====================================
Files 99 97 -2
Lines 5055 4875 -180
Branches 919 880 -39
====================================
- Hits 4050 3925 -125
+ Misses 807 753 -54
+ Partials 198 197 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Prerequisites
Description
Removes all outdated
#if...#else
conditions from the code.