mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Drop the FromChar in ConvertNotation
This commit is contained in:
parent
736d87aa35
commit
7115f9e716
@ -388,15 +388,7 @@ std::string SIM_VALUE::ConvertNotation( const std::string& aString, NOTATION aFr
|
|||||||
std::string prefix = SIM_VALUE_PARSER::ExponentToUnitPrefix( exponent, expReduction,
|
std::string prefix = SIM_VALUE_PARSER::ExponentToUnitPrefix( exponent, expReduction,
|
||||||
aToNotation );
|
aToNotation );
|
||||||
double significand{};
|
double significand{};
|
||||||
#if !defined( __clang__ )
|
|
||||||
// clang still violates the standard
|
|
||||||
// best effort, ignore errors
|
|
||||||
std::from_chars( parseResult.significand.data(),
|
|
||||||
parseResult.significand.data() + parseResult.significand.size(),
|
|
||||||
significand );
|
|
||||||
#else
|
|
||||||
wxString( parseResult.significand ).ToCDouble( &significand );
|
wxString( parseResult.significand ).ToCDouble( &significand );
|
||||||
#endif
|
|
||||||
|
|
||||||
exponent -= expReduction;
|
exponent -= expReduction;
|
||||||
return fmt::format( "{:g}{}", significand * std::pow( 10, exponent ),
|
return fmt::format( "{:g}{}", significand * std::pow( 10, exponent ),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user