remove unused parameter; simplify
This commit is contained in:
@@ -1183,13 +1183,13 @@ public:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OptionRowHandler* OptionRowHandlerUtil::Make( const Commands &cmds, OptionRowDefinition &defOut )
|
||||
OptionRowHandler* OptionRowHandlerUtil::Make( const Commands &cmds )
|
||||
{
|
||||
OptionRowHandler* pHand = NULL;
|
||||
|
||||
const CString &name = cmds.v[0].GetName();
|
||||
|
||||
#define MAKE( type ) { type *p = new type; p->Load( defOut, cmds ); pHand = p; }
|
||||
#define MAKE( type ) { type *p = new type; p->Load( cmds ); pHand = p; }
|
||||
|
||||
if( name == "list" ) MAKE( OptionRowHandlerList )
|
||||
else if( name == "lua" ) MAKE( OptionRowHandlerLua )
|
||||
|
||||
@@ -24,15 +24,14 @@ public:
|
||||
m_cmds.v.clear();
|
||||
m_vsReloadRowMessages.clear();
|
||||
}
|
||||
void Load( OptionRowDefinition &defOut, const Commands &cmds )
|
||||
void Load( const Commands &cmds )
|
||||
{
|
||||
Init();
|
||||
m_cmds = cmds;
|
||||
this->LoadInternal( m_Def, cmds );
|
||||
defOut = m_Def;
|
||||
}
|
||||
virtual void LoadInternal( OptionRowDefinition &defOut, const Commands &cmds ) = 0;
|
||||
virtual void Reload( OptionRowDefinition &defOut ) { this->Load(defOut,m_cmds); }
|
||||
virtual void Reload( OptionRowDefinition &defOut ) { this->Load(m_cmds); defOut = m_Def; }
|
||||
virtual void ImportOption( const OptionRowDefinition &row, const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const = 0;
|
||||
/* Returns an OPT mask. */
|
||||
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const = 0;
|
||||
@@ -43,7 +42,7 @@ public:
|
||||
|
||||
namespace OptionRowHandlerUtil
|
||||
{
|
||||
OptionRowHandler* Make( const Commands &cmds, OptionRowDefinition &defOut );
|
||||
OptionRowHandler* Make( const Commands &cmds );
|
||||
}
|
||||
|
||||
inline void VerifySelected( SelectType st, const vector<bool> &vbSelected, const CString &sName )
|
||||
|
||||
@@ -102,8 +102,7 @@ void ScreenOptionsManageProfiles::BeginScreen()
|
||||
|
||||
if( SHOW_CREATE_NEW )
|
||||
{
|
||||
OptionRowDefinition def;
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( ParseCommands("gamecommand;screen,ScreenOptionsEditProfile;name,Create New"), def );
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( ParseCommands("gamecommand;screen,ScreenOptionsEditProfile;name,Create New") );
|
||||
pHand->m_Def.m_layoutType = LAYOUT_SHOW_ALL_IN_ROW;
|
||||
pHand->m_Def.m_bAllowThemeTitle = false;
|
||||
pHand->m_Def.m_bAllowThemeItems = false;
|
||||
@@ -121,9 +120,8 @@ void ScreenOptionsManageProfiles::BeginScreen()
|
||||
Profile *pProfile = PROFILEMAN->GetLocalProfile( *s );
|
||||
ASSERT( pProfile );
|
||||
|
||||
OptionRowDefinition def;
|
||||
CString sCommand = ssprintf( "gamecommand;screen,ScreenOptionsEditProfile;profileid,%s;name,%s", s->c_str(), pProfile->m_sDisplayName.c_str() );
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( ParseCommands(sCommand), def );
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( ParseCommands(sCommand) );
|
||||
pHand->m_Def.m_layoutType = LAYOUT_SHOW_ALL_IN_ROW;
|
||||
pHand->m_Def.m_bAllowThemeTitle = false;
|
||||
pHand->m_Def.m_bAllowThemeItems = false;
|
||||
|
||||
@@ -59,8 +59,7 @@ void ScreenOptionsMaster::Init()
|
||||
Commands cmds;
|
||||
ParseCommands( sRowCommands, cmds );
|
||||
|
||||
OptionRowDefinition def;
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( cmds, def );
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::Make( cmds );
|
||||
if( pHand == NULL )
|
||||
RageException::Throw( "Invalid OptionRowHandler '%s' in %s::Line%i", cmds.GetOriginalCommandString().c_str(), m_sName.c_str(), i );
|
||||
OptionRowHandlers.push_back( pHand );
|
||||
|
||||
Reference in New Issue
Block a user