From eafac8fb96fedf63c850cb3a02b0138f2148d2e8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 28 Jul 2006 00:24:30 +0000 Subject: [PATCH] simplify --- stepmania/src/Sprite.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index d063cebe05..6a77cee915 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -114,14 +114,13 @@ void Sprite::Load( RageTextureID ID ) void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode ) { - RString sTextureFile; RString sPath; - if( pNode->GetAttrValue( "Texture", sTextureFile ) ) + if( pNode->GetAttrValue( "Texture", sPath ) ) { - LuaHelpers::RunAtExpressionS( sTextureFile ); + LuaHelpers::RunAtExpressionS( sPath ); - bool bIsAbsolutePath = sTextureFile.Left(1) == "/"; - sPath = bIsAbsolutePath ? sTextureFile : sDir+sTextureFile; + bool bIsAbsolutePath = sPath.Left(1) == "/"; + sPath = bIsAbsolutePath ? : sDir+sPath; } if( !sPath.empty() )