don't load floats as strings

This commit is contained in:
Glenn Maynard
2007-01-22 21:56:56 +00:00
parent e0997258ef
commit 9a803f94ed
+1 -3
View File
@@ -33,11 +33,9 @@ void MeterDisplay::LoadFromNode( const XNode* pNode )
{ {
LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() ); LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() );
RString sExpr; if( !pNode->GetAttrValue("StreamWidth", m_fStreamWidth) )
if( !pNode->GetAttrValue( "StreamWidth", sExpr ) )
RageException::Throw( "%s: MeterDisplay: missing the \"StreamWidth\" attribute", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: MeterDisplay: missing the \"StreamWidth\" attribute", ActorUtil::GetWhere(pNode).c_str() );
m_fStreamWidth=StringToFloat(sExpr);
{ {
RString sStreamPath; RString sStreamPath;
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) ) if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )