Remove RageUtil_CachedObject

I don't notice any performance drawback in gameplay, but it was
massively slowing down ScreenReloadSongs.
This commit is contained in:
Martin Natano
2022-06-10 19:33:23 +02:00
parent 62f8ed5c5c
commit 49127f6a92
17 changed files with 19 additions and 338 deletions
+2 -8
View File
@@ -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