small optimization in wxConfigPathChanger: don't change the path if it is already the same as requested

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-10-04 08:29:15 +00:00
parent 384198de1b
commit 4c420a80e0

View File

@ -239,7 +239,7 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer,
strPath = wxCONFIG_PATH_SEPARATOR;
}
if ( !strPath.IsEmpty() ) {
if ( !strPath.IsEmpty() && m_pContainer->GetPath() != strPath ) {
// do change the path
m_bChanged = true;
m_strName = strEntry.AfterLast(wxCONFIG_PATH_SEPARATOR);