sim: fix trailing zero removal
This commit is contained in:
parent
bba57097b7
commit
2bcd8af25c
|
@ -221,11 +221,14 @@ SPICE_VALUE SPICE_VALUE::operator/( const SPICE_VALUE& aOther ) const
|
|||
|
||||
void SPICE_VALUE::stripZeros( wxString& aString )
|
||||
{
|
||||
while( aString.EndsWith( '0' ) )
|
||||
aString.RemoveLast();
|
||||
if ( aString.Find(',') >= 0 || aString.Find('.') >= 0 )
|
||||
{
|
||||
while( aString.EndsWith( '0' ) )
|
||||
aString.RemoveLast();
|
||||
|
||||
if( aString.EndsWith( '.' ) || aString.EndsWith( ',' ) )
|
||||
aString.RemoveLast();
|
||||
if( aString.EndsWith( '.' ) || aString.EndsWith( ',' ) )
|
||||
aString.RemoveLast();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
};
|
||||
|
||||
SPICE_VALUE()
|
||||
: m_base( 0 ), m_prefix( PFX_NONE )
|
||||
: m_base( 0 ), m_prefix( PFX_NONE ), m_spiceStr( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue