mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-20 17:00:14 +02:00
use AsSpan instead of SubString
This commit is contained in:
@@ -249,10 +249,10 @@ namespace CodeCoverageSummary
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!int.TryParse(thresholds.Substring(0, s), out lowerPercentage))
|
if (!int.TryParse(thresholds.AsSpan(0, s), out lowerPercentage))
|
||||||
throw new ArgumentException("Threshold parameter set incorrectly.");
|
throw new ArgumentException("Threshold parameter set incorrectly.");
|
||||||
|
|
||||||
if (!int.TryParse(thresholds.Substring(s + 1), out upperPercentage))
|
if (!int.TryParse(thresholds.AsSpan(s + 1), out upperPercentage))
|
||||||
throw new ArgumentException("Threshold parameter set incorrectly.");
|
throw new ArgumentException("Threshold parameter set incorrectly.");
|
||||||
}
|
}
|
||||||
lowerThreshold = lowerPercentage / 100.0;
|
lowerThreshold = lowerPercentage / 100.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user