Resolve removal of the rest of BCC-affected

Make changes based on feedback provided by vadz.
This commit is contained in:
PB
2020-10-14 20:11:58 +02:00
parent 6ba1b8c78c
commit caab5dda00
6 changed files with 10 additions and 40 deletions

View File

@@ -70,9 +70,6 @@ static wxString FilterOutValue(const wxString& str);
static wxString FilterInEntryName(const wxString& str);
static wxString FilterOutEntryName(const wxString& str);
// get the name to use in wxFileConfig ctor
static wxString GetAppName(const wxString& appname);
// ============================================================================
// private classes
// ============================================================================
@@ -351,7 +348,8 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
const wxString& strLocal, const wxString& strGlobal,
long style,
const wxMBConv& conv)
: wxConfigBase(::GetAppName(appName), vendorName,
: wxConfigBase(( !appName && wxTheApp ) ? wxTheApp->GetAppName() : appName,
vendorName,
strLocal, strGlobal,
style),
m_fnLocalFile(strLocal),
@@ -2095,14 +2093,4 @@ static wxString FilterOutEntryName(const wxString& str)
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;
}
#endif // wxUSE_CONFIG