Minor refactoring; doing this just to help minimize the changelog spam of the next commit (not that it'll help much)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3600 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-08-04 19:10:41 +00:00
parent 70e8c3cf41
commit c439d1bef2
6 changed files with 27 additions and 27 deletions

View File

@ -81,16 +81,16 @@ protected:
};
// --------------------------------------------------------------------------------------
// IniScopedGroup
// ScopedIniGroup
// --------------------------------------------------------------------------------------
class IniScopedGroup
class ScopedIniGroup
{
protected:
IniInterface& m_mom;
public:
IniScopedGroup( IniInterface& mommy, const wxString& group );
virtual ~IniScopedGroup();
ScopedIniGroup( IniInterface& mommy, const wxString& group );
virtual ~ScopedIniGroup();
};
// --------------------------------------------------------------------------------------

View File

@ -38,14 +38,14 @@ static int _calcEnumLength( const wxChar* const* enumArray )
return cnt;
}
IniScopedGroup::IniScopedGroup( IniInterface& mommy, const wxString& group )
ScopedIniGroup::ScopedIniGroup( IniInterface& mommy, const wxString& group )
: m_mom( mommy )
{
pxAssertDev( wxStringTokenize( group, L"/" ).Count() <= 1, L"Cannot nest more than one group deep per instance of IniScopedGroup." );
pxAssertDev( wxStringTokenize( group, L"/" ).Count() <= 1, L"Cannot nest more than one group deep per instance of ScopedIniGroup." );
m_mom.SetPath( group );
}
IniScopedGroup::~IniScopedGroup()
ScopedIniGroup::~ScopedIniGroup()
{
m_mom.SetPath( L".." );
}

View File

@ -214,7 +214,7 @@ void wxDialogWithHelpers::SmartCenterFit()
wxRect screenRect( GetScreenRect() );
IniLoader loader( cfg );
IniScopedGroup group( loader, L"DialogPositions" );
ScopedIniGroup group( loader, L"DialogPositions" );
cfg->SetRecordDefaults( false );
if( GetWindowStyle() & wxRESIZE_BORDER )
@ -289,7 +289,7 @@ void wxDialogWithHelpers::OnCloseWindow( wxCloseEvent& evt )
{
wxPoint pos( screenRect.GetPosition() );
IniSaver saver( cfg );
IniScopedGroup group( saver, L"DialogPositions" );
ScopedIniGroup group( saver, L"DialogPositions" );
if( GetWindowStyle() & wxRESIZE_BORDER )
{

View File

@ -24,7 +24,7 @@
void TraceLogFilters::LoadSave( IniInterface& ini )
{
TraceLogFilters defaults;
IniScopedGroup path( ini, L"TraceLog" );
ScopedIniGroup path( ini, L"TraceLog" );
IniEntry( Enabled );
IniEntry( SIF );
@ -55,7 +55,7 @@ ConsoleLogFilters::ConsoleLogFilters()
void ConsoleLogFilters::LoadSave( IniInterface& ini )
{
ConsoleLogFilters defaults;
IniScopedGroup path( ini, L"ConsoleLog" );
ScopedIniGroup path( ini, L"ConsoleLog" );
IniBitBool( ELF );
IniBitBool( StdoutEE );
@ -66,7 +66,7 @@ void ConsoleLogFilters::LoadSave( IniInterface& ini )
void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini )
{
SpeedhackOptions defaults;
IniScopedGroup path( ini, L"Speedhacks" );
ScopedIniGroup path( ini, L"Speedhacks" );
IniBitfield( EECycleRate );
IniBitfield( VUCycleSteal );
@ -81,7 +81,7 @@ void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini )
void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini )
{
ProfilerOptions defaults;
IniScopedGroup path( ini, L"Profiler" );
ScopedIniGroup path( ini, L"Profiler" );
IniBitBool( Enabled );
IniBitBool( RecBlocks_EE );
@ -154,7 +154,7 @@ void Pcsx2Config::RecompilerOptions::ApplySanityCheck()
void Pcsx2Config::RecompilerOptions::LoadSave( IniInterface& ini )
{
RecompilerOptions defaults;
IniScopedGroup path( ini, L"Recompiler" );
ScopedIniGroup path( ini, L"Recompiler" );
IniBitBool( EnableEE );
IniBitBool( EnableIOP );
@ -195,7 +195,7 @@ void Pcsx2Config::CpuOptions::ApplySanityCheck()
void Pcsx2Config::CpuOptions::LoadSave( IniInterface& ini )
{
CpuOptions defaults;
IniScopedGroup path( ini, L"CPU" );
ScopedIniGroup path( ini, L"CPU" );
IniBitBoolEx( sseMXCSR.DenormalsAreZero, "FPU.DenormalsAreZero" );
IniBitBoolEx( sseMXCSR.FlushToZero, "FPU.FlushToZero" );
@ -231,7 +231,7 @@ Pcsx2Config::GSOptions::GSOptions()
void Pcsx2Config::GSOptions::LoadSave( IniInterface& ini )
{
GSOptions defaults;
IniScopedGroup path( ini, L"GS" );
ScopedIniGroup path( ini, L"GS" );
IniEntry( SynchronousMTGS );
IniEntry( DisableOutput );
@ -337,7 +337,7 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
{
GamefixOptions defaults;
IniScopedGroup path( ini, L"Gamefixes" );
ScopedIniGroup path( ini, L"Gamefixes" );
IniBitBool( VuAddSubHack );
IniBitBool( VuClipFlagHack );
@ -360,7 +360,7 @@ Pcsx2Config::Pcsx2Config()
void Pcsx2Config::LoadSave( IniInterface& ini )
{
Pcsx2Config defaults;
IniScopedGroup path( ini, L"EmuCore" );
ScopedIniGroup path( ini, L"EmuCore" );
IniBitBool( CdvdVerboseReads );
IniBitBool( CdvdDumpBlocks );

View File

@ -408,7 +408,7 @@ AppConfig::AppConfig()
// ------------------------------------------------------------------------
void AppConfig::LoadSaveUserMode( IniInterface& ini, const wxString& cwdhash )
{
IniScopedGroup path( ini, cwdhash );
ScopedIniGroup path( ini, cwdhash );
// timestamping would be useful if we want to auto-purge unused entries after
// a period of time. Dunno if it's needed.
@ -455,7 +455,7 @@ void AppConfig::LoadSaveUserMode( IniInterface& ini, const wxString& cwdhash )
void AppConfig::LoadSaveMemcards( IniInterface& ini )
{
AppConfig defaults;
IniScopedGroup path( ini, L"MemoryCards" );
ScopedIniGroup path( ini, L"MemoryCards" );
for( uint slot=0; slot<2; ++slot )
{
@ -543,7 +543,7 @@ AppConfig::ConsoleLogOptions::ConsoleLogOptions()
void AppConfig::ConsoleLogOptions::LoadSave( IniInterface& ini, const wxChar* logger )
{
ConsoleLogOptions defaults;
IniScopedGroup path( ini, logger );
ScopedIniGroup path( ini, logger );
IniEntry( Visible );
IniEntry( AutoDock );
@ -580,7 +580,7 @@ AppConfig::FolderOptions::FolderOptions()
void AppConfig::FolderOptions::LoadSave( IniInterface& ini )
{
FolderOptions defaults;
IniScopedGroup path( ini, L"Folders" );
ScopedIniGroup path( ini, L"Folders" );
if( ini.IsSaving() )
{
@ -626,7 +626,7 @@ const wxFileName& AppConfig::FilenameOptions::operator[]( PluginsEnum_t pluginid
void AppConfig::FilenameOptions::LoadSave( IniInterface& ini )
{
IniScopedGroup path( ini, L"Filenames" );
ScopedIniGroup path( ini, L"Filenames" );
static const wxFileName pc( L"Please Configure" );
@ -674,7 +674,7 @@ void AppConfig::GSWindowOptions::SanityCheck()
void AppConfig::GSWindowOptions::LoadSave( IniInterface& ini )
{
IniScopedGroup path( ini, L"GSWindow" );
ScopedIniGroup path( ini, L"GSWindow" );
GSWindowOptions defaults;
IniEntry( CloseOnEsc );
@ -723,7 +723,7 @@ void AppConfig::FramerateOptions::SanityCheck()
void AppConfig::FramerateOptions::LoadSave( IniInterface& ini )
{
IniScopedGroup path( ini, L"Framerate" );
ScopedIniGroup path( ini, L"Framerate" );
FramerateOptions defaults;
IniEntry( NominalScalar );

View File

@ -174,7 +174,7 @@ void RecentIsoManager::AppStatusEvent_OnSettingsLoadSave( const AppSettingsEvent
// and that could leave some residual entries in the config.
ini.GetConfig().DeleteGroup( L"RecentIso" );
IniScopedGroup groupie( ini, L"RecentIso" );
ScopedIniGroup groupie( ini, L"RecentIso" );
int cnt = m_Items.size();
for( int i=0; i<cnt; ++i )
@ -187,7 +187,7 @@ void RecentIsoManager::AppStatusEvent_OnSettingsLoadSave( const AppSettingsEvent
RemoveAllFromMenu();
m_MaxLength = g_Conf->RecentIsoCount;
IniScopedGroup groupie( ini, L"RecentIso" );
ScopedIniGroup groupie( ini, L"RecentIso" );
for( uint i=0; i<m_MaxLength; ++i )
{
wxString loadtmp;