File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -435,11 +435,13 @@ double ReadNumber(bool allowComma)
435
435
}
436
436
else
437
437
{
438
- string subString = _pathString . Substring ( start , _curIndex - start ) ;
439
-
440
438
try
441
439
{
442
- return System . Convert . ToDouble ( subString , _formatProvider ) ;
440
+ #if NET
441
+ return double . Parse ( _pathString . AsSpan ( start , _curIndex - start ) , provider : _formatProvider ) ;
442
+ #else
443
+ return double . Parse ( _pathString . Substring ( start , _curIndex - start ) , provider : _formatProvider ) ;
444
+ #endif
443
445
}
444
446
catch ( FormatException except )
445
447
{
@@ -691,9 +693,9 @@ internal void ParseToGeometryContext(
691
693
large ,
692
694
#if PBTCOMPILER
693
695
sweep ,
694
- #else
696
+ #else
695
697
sweep ? SweepDirection . Clockwise : SweepDirection . Counterclockwise ,
696
- #endif
698
+ #endif
697
699
IsStroked,
698
700
! IsSmoothJoin
699
701
) ;
You can’t perform that action at this time.
0 commit comments