Remove RageUtil_CachedObject
I don't notice any performance drawback in gameplay, but it was massively slowing down ScreenReloadSongs.
This commit is contained in:
+2
-8
@@ -32,7 +32,6 @@ void TrailID::FromTrail( const Trail *p )
|
||||
st = p->m_StepsType;
|
||||
cd = p->m_CourseDifficulty;
|
||||
}
|
||||
m_Cache.Unset();
|
||||
}
|
||||
|
||||
Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const
|
||||
@@ -40,12 +39,8 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const
|
||||
ASSERT( p != nullptr );
|
||||
|
||||
Trail *pRet = nullptr;
|
||||
if( !m_Cache.Get(&pRet) )
|
||||
{
|
||||
if( st != StepsType_Invalid && cd != Difficulty_Invalid )
|
||||
pRet = p->GetTrail( st, cd );
|
||||
m_Cache.Set( pRet );
|
||||
}
|
||||
if( st != StepsType_Invalid && cd != Difficulty_Invalid )
|
||||
pRet = p->GetTrail( st, cd );
|
||||
|
||||
if( !bAllowNull && pRet == nullptr )
|
||||
RageException::Throw( "%i, %i, \"%s\"", st, cd, p->GetDisplayFullTitle().c_str() );
|
||||
@@ -74,7 +69,6 @@ void TrailID::LoadFromNode( const XNode* pNode )
|
||||
|
||||
pNode->GetAttrValue( "CourseDifficulty", sTemp );
|
||||
cd = StringToDifficulty( sTemp );
|
||||
m_Cache.Unset();
|
||||
}
|
||||
|
||||
RString TrailID::ToString() const
|
||||
|
||||
Reference in New Issue
Block a user