git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10343
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxString str;
if (Read(key, & str))
{
wxString str;
if (Read(key, & str))
{
- *val = wxAtof(str);
- return TRUE;
+ return wxSscanf(str, _T("%g"), val) == 1;
{
long l;
bool ret = Read(key, &l, (long) defVal);
{
long l;
bool ret = Read(key, &l, (long) defVal);
+ if (ret)
+ *pi = (int) l;
return ret;
}
bool wxConfigBase::Write(const wxString& key, double val)
{
wxString str;
return ret;
}
bool wxConfigBase::Write(const wxString& key, double val)
{
wxString str;
- str.Printf(wxT("%f"), val);
+ str.Printf(wxT("%g"), val);
return Write(key, str);
}
return Write(key, str);
}
bool wxConfigBase::Write( const wxString &key, const wxChar *text )
{
bool wxConfigBase::Write( const wxString &key, const wxChar *text )
{
- wxString str( text ) ;
- return Write( key, str ) ;
+ return Write(key, str) ;
}
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
}
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{