diff --git a/common/include/Utilities/IniInterface.h b/common/include/Utilities/IniInterface.h index 2f325874cd..da820b62da 100644 --- a/common/include/Utilities/IniInterface.h +++ b/common/include/Utilities/IniInterface.h @@ -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(); }; // -------------------------------------------------------------------------------------- diff --git a/common/src/Utilities/IniInterface.cpp b/common/src/Utilities/IniInterface.cpp index 03a6154983..b90d521976 100644 --- a/common/src/Utilities/IniInterface.cpp +++ b/common/src/Utilities/IniInterface.cpp @@ -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".." ); } diff --git a/common/src/Utilities/wxHelpers.cpp b/common/src/Utilities/wxHelpers.cpp index 3b50e52584..d70d173c54 100644 --- a/common/src/Utilities/wxHelpers.cpp +++ b/common/src/Utilities/wxHelpers.cpp @@ -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 ) { diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 0a779b4698..1c6a0f8995 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -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 ); diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index ff2f35824d..b2ceab8aa4 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -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 ); diff --git a/pcsx2/gui/RecentIsoList.cpp b/pcsx2/gui/RecentIsoList.cpp index d4173f76c8..64d64fb8bb 100644 --- a/pcsx2/gui/RecentIsoList.cpp +++ b/pcsx2/gui/RecentIsoList.cpp @@ -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; iRecentIsoCount; - IniScopedGroup groupie( ini, L"RecentIso" ); + ScopedIniGroup groupie( ini, L"RecentIso" ); for( uint i=0; i