compilation problem under Windows fixed (Karsten, you should use a cast when
calling a const function from a non-const one - gcc compiles it it, but it's broken) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -220,18 +220,18 @@ wxFileConfig::wxFileConfig(const wxString& strLocal, const wxString& strGlobal)
|
|||||||
: m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
|
: m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
|
||||||
{
|
{
|
||||||
// if the path is not absolute, prepend the standard directory to it
|
// if the path is not absolute, prepend the standard directory to it
|
||||||
|
if ( !strLocal.IsEmpty() && !wxIsAbsolutePath(strLocal) )
|
||||||
if ( !strLocal.IsEmpty() && !wxIsPathSeparator(strLocal[0u]) )
|
|
||||||
{
|
{
|
||||||
m_strLocalFile = GetLocalDir();
|
m_strLocalFile = GetLocalDir();
|
||||||
m_strLocalFile << strLocal;
|
m_strLocalFile << strLocal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !strGlobal.IsEmpty() && !wxIsPathSeparator(strGlobal[0u]) )
|
if ( !strGlobal.IsEmpty() && !wxIsAbsolutePath(strGlobal) )
|
||||||
{
|
{
|
||||||
m_strGlobalFile = GetGlobalDir();
|
m_strGlobalFile = GetGlobalDir();
|
||||||
m_strGlobalFile << strGlobal;
|
m_strGlobalFile << strGlobal;
|
||||||
}
|
}
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,8 +532,8 @@ bool wxFileConfig::Read(wxString *pstr,
|
|||||||
|
|
||||||
ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
|
ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
|
||||||
if (pEntry == NULL) {
|
if (pEntry == NULL) {
|
||||||
if(IsRecordingDefaults())
|
if( IsRecordingDefaults() )
|
||||||
Write(szKey,szDefault);
|
((wxFileConfig *)this)->Write(szKey,szDefault);
|
||||||
*pstr = ExpandEnvVars(szDefault);
|
*pstr = ExpandEnvVars(szDefault);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user