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

@@ -6,7 +6,7 @@
The formats below are disabled because wxWidgets doesn't support these
compilers any longer (although bakefile still does).
-->
<disable-formats>dmars,dmars_smake,msvc6prj,watcom</disable-formats>
<disable-formats>borland,dmars,dmars_smake,msvc6prj,watcom</disable-formats>
<!-- These wildcards match all .bkl files in wxWidgets tree: -->

View File

@@ -346,15 +346,8 @@ void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUT
#define WXDEBUG_DUMPDELAYCOUNTER
// Borland C++ Builder 6 seems to have troubles with inline functions (see bug
// 819700)
#if 0
inline void wxTrace(const wxChar *WXUNUSED(fmt)) {}
inline void wxTraceLevel(int WXUNUSED(level), const wxChar *WXUNUSED(fmt)) {}
#else
#define wxTrace(fmt)
#define wxTraceLevel(l, fmt)
#endif
#define WXTRACE true ? (void)0 : wxTrace
#define WXTRACELEVEL true ? (void)0 : wxTraceLevel

View File

@@ -50,16 +50,12 @@ extern WXDLLIMPEXP_CORE int
#define wxIMPLEMENT_WXWIN_MAIN \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \
wxCmdLineArgType WXUNUSED(lpCmdLine), \
wxCmdLineArgType lpCmdLine, \
int nCmdShow) \
{ \
wxDISABLE_DEBUG_SUPPORT(); \
\
/* NB: We pass NULL in place of lpCmdLine to behave the same as */ \
/* Borland-specific wWinMain() above. If it becomes needed */ \
/* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \
/* wWinMain() above too. */ \
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \
}
#endif // wxUSE_GUI

View File

@@ -1181,7 +1181,7 @@ wxAppDerivedClass& wxGetApp();
Notice that this function is only available if @c wxUSE_ON_FATAL_EXCEPTION
is 1 and under Windows platform this requires a compiler with support for
SEH (structured exception handling) which currently means only Microsoft
Visual C++ or a recent Borland C++ version.
Visual C++.
@header{wx/app.h}
*/

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

View File

@@ -1060,13 +1060,6 @@ wxFileName wxGenericFileCtrl::DoGetFileName() const
return fn;
}
// helper used in DoGetFilenames() and needed because Borland can't compile
// operator?: inline
static inline wxString GetFileNameOrPath(const wxFileName& fn, bool fullPath)
{
return fullPath ? fn.GetFullPath() : fn.GetFullName();
}
void
wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
{
@@ -1081,7 +1074,7 @@ wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
if ( fn.IsRelative() )
fn.MakeAbsolute(dir);
filenames.push_back(GetFileNameOrPath(fn, fullPath));
filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
return;
}
@@ -1105,7 +1098,7 @@ wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const
m_list->GetItem(item);
const wxFileName fn(dir, item.m_text);
filenames.push_back(GetFileNameOrPath(fn, fullPath));
filenames.push_back(fullPath ? fn.GetFullPath() : fn.GetFullName());
}
}