From: Vadim Zeitlin Date: Mon, 4 Oct 2004 08:29:15 +0000 (+0000) Subject: small optimization in wxConfigPathChanger: don't change the path if it is already... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4c420a80e0fb11511b235411875ba5d3e0eb8492 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 --- diff --git a/src/common/config.cpp b/src/common/config.cpp index 7e4173e4e2..80b43e4b9a 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -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);