]> git.saurik.com Git - wxWidgets.git/commitdiff
small optimization in wxConfigPathChanger: don't change the path if it is already...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Oct 2004 08:29:15 +0000 (08:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Oct 2004 08:29:15 +0000 (08:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/config.cpp

index 7e4173e4e237006b1c536fb82570a5696b18a554..80b43e4b9a5c5a38cfdf2278c727aabc370193c2 100644 (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);