attempted Borland C++ compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,6 +78,9 @@ static wxString FilterOutValue(const wxString& str);
|
|||||||
static wxString FilterInEntryName(const wxString& str);
|
static wxString FilterInEntryName(const wxString& str);
|
||||||
static wxString FilterOutEntryName(const wxString& str);
|
static wxString FilterOutEntryName(const wxString& str);
|
||||||
|
|
||||||
|
// get the name to use in wxFileConfig ctor
|
||||||
|
static wxString GetAppName(const wxString& appname);
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -198,9 +201,9 @@ void wxFileConfig::Init()
|
|||||||
wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
|
wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
|
||||||
const wxString& strLocal, const wxString& strGlobal,
|
const wxString& strLocal, const wxString& strGlobal,
|
||||||
long style)
|
long style)
|
||||||
: wxConfigBase(!appName && wxTheApp ? wxTheApp->GetAppName()
|
: wxConfigBase(::GetAppName(appName), vendorName,
|
||||||
: appName,
|
strLocal, strGlobal,
|
||||||
vendorName, strLocal, strGlobal, style),
|
style),
|
||||||
m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
|
m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
|
||||||
{
|
{
|
||||||
// Make up names for files if empty
|
// Make up names for files if empty
|
||||||
@@ -1467,3 +1470,12 @@ static wxString FilterOutEntryName(const wxString& str)
|
|||||||
return strResult;
|
return strResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we can't put ?: in the ctor initializer list because it confuses some
|
||||||
|
// broken compilers (Borland C++)
|
||||||
|
static wxString GetAppName(const wxString& appName)
|
||||||
|
{
|
||||||
|
if ( !appName && wxTheApp )
|
||||||
|
return wxTheApp->GetAppName();
|
||||||
|
else
|
||||||
|
return appName;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user