Changed: Replaced atof by NLMISC::fromString

This commit is contained in:
kervala 2015-02-14 12:43:29 +01:00
parent 1ce011be38
commit 65fb1bc8c1
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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;