Changed: Replaced atof by NLMISC::fromString
--HG-- branch : hotfix
This commit is contained in:
parent
3039428094
commit
6853497593
2 changed files with 5 additions and 3 deletions
|
@ -201,7 +201,7 @@ bool CTpSpawnZone::build(const NLLIGO::CPrimPoint * point)
|
|||
nlwarning("<CTpSpawnZone build> : no z in CTpSpawnZone '%s'",_Name.c_str() );
|
||||
return false;
|
||||
}
|
||||
Point.z = ( float ) atof( value.c_str() );
|
||||
NLMISC::fromString(value, Point.z);
|
||||
Point.z = float( sint32 (1000.0f* Point.z) );
|
||||
}
|
||||
else
|
||||
|
|
|
@ -905,14 +905,16 @@ bool CDatabase::set(RY_PDS::TTableIndex table, RY_PDS::TRowIndex row, RY_PDS::TC
|
|||
|
||||
case PDS_float:
|
||||
{
|
||||
float data = (float)atof(value.c_str());
|
||||
float data;
|
||||
NLMISC::fromString(value, data);
|
||||
return set(table, row, column, sizeof(data), &data);
|
||||
}
|
||||
break;
|
||||
|
||||
case PDS_double:
|
||||
{
|
||||
double data = (double)atof(value.c_str());
|
||||
double data;
|
||||
NLMISC::fromString(value, data);
|
||||
return set(table, row, column, sizeof(data), &data);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue