- make fast_atof_move a template and rename it to fast_atoreal_move.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1125 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-01-31 16:18:32 +00:00
parent 16a5bef3ba
commit c12fadc93b
23 changed files with 135 additions and 104 deletions

View File

@@ -189,9 +189,9 @@ void LWSImporter::ReadEnvelope(const LWS::Element& dad, LWO::Envelope& fill )
float f;
SkipSpaces(&c);
c = fast_atof_move(c,key.value);
c = fast_atoreal_move<float>(c,key.value);
SkipSpaces(&c);
c = fast_atof_move(c,f);
c = fast_atoreal_move<float>(c,f);
key.time = f;
@@ -224,7 +224,7 @@ void LWSImporter::ReadEnvelope(const LWS::Element& dad, LWO::Envelope& fill )
}
for (unsigned int i = 0; i < num;++i) {
SkipSpaces(&c);
c = fast_atof_move(c,key.params[i]);
c = fast_atoreal_move<float>(c,key.params[i]);
}
}
else if ((*it).tokens[0] == "Behaviors") {
@@ -265,10 +265,10 @@ void LWSImporter::ReadEnvelope_Old(
// parse value and time, skip the rest for the moment.
LWO::Key key;
const char* c = fast_atof_move((*it).tokens[0].c_str(),key.value);
const char* c = fast_atoreal_move<float>((*it).tokens[0].c_str(),key.value);
SkipSpaces(&c);
float f;
fast_atof_move((*it).tokens[0].c_str(),f);
fast_atoreal_move<float>((*it).tokens[0].c_str(),f);
key.time = f;
envl.keys.push_back(key);
@@ -738,7 +738,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightIntensity\'");
else fast_atof_move(c, nodes.back().lightIntensity );
else fast_atoreal_move<float>(c, nodes.back().lightIntensity );
}
// 'LightType': set type of currently active light
@@ -779,11 +779,11 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightColor\'");
else {
c = fast_atof_move(c, (float&) nodes.back().lightColor.r );
c = fast_atoreal_move<float>(c, (float&) nodes.back().lightColor.r );
SkipSpaces(&c);
c = fast_atof_move(c, (float&) nodes.back().lightColor.g );
c = fast_atoreal_move<float>(c, (float&) nodes.back().lightColor.g );
SkipSpaces(&c);
c = fast_atof_move(c, (float&) nodes.back().lightColor.b );
c = fast_atoreal_move<float>(c, (float&) nodes.back().lightColor.b );
}
}
@@ -792,11 +792,11 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
if (nodes.empty())
DefaultLogger::get()->error("LWS: Unexpected keyword: \'PivotPosition\'");
else {
c = fast_atof_move(c, (float&) nodes.back().pivotPos.x );
c = fast_atoreal_move<float>(c, (float&) nodes.back().pivotPos.x );
SkipSpaces(&c);
c = fast_atof_move(c, (float&) nodes.back().pivotPos.y );
c = fast_atoreal_move<float>(c, (float&) nodes.back().pivotPos.y );
SkipSpaces(&c);
c = fast_atof_move(c, (float&) nodes.back().pivotPos.z );
c = fast_atoreal_move<float>(c, (float&) nodes.back().pivotPos.z );
// Mark pivotPos as set
nodes.back().isPivotSet = true;
}