From cf474d7f486aa52facd349f2fad8dfcc381d2fdf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Oct 2022 18:35:53 +0100 Subject: [PATCH] Remove wxOnAssert() overload used in ANSI build only This could be also used by the applications if they decided to call it directly, for whatever reason, but, hopefully, this shouldn't be a common occurrence, as passing wide file name is really inconvenient, and it was deprecated since 2.8, so should be safe to remove by now. --- docs/changes.txt | 3 +++ include/wx/debug.h | 9 --------- src/common/appbase.cpp | 13 ------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f262050a77..6418898b8f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -46,6 +46,9 @@ Changes in behaviour which may result in build errors - wxMotif and wxGTK1 ports have been removed, please use wxWidgets 3.2 if you still need them. +- wxOnAssert() overload taking wide character file name was removed. If you + call it for any reason, please use one of the other overloads instead. + 3.3.0: (released 2022-??-??) ---------------------------- diff --git a/include/wx/debug.h b/include/wx/debug.h index a8ca42e599..c82ff5de24 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -190,15 +190,6 @@ extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, const char *cond, const wxChar *msg) ; -// this version is for compatibility with wx 2.8 Unicode build only, we don't -// use it ourselves any more except in ANSI-only build in which case it is all -// we need -extern WXDLLIMPEXP_BASE void wxOnAssert(const wxChar *file, - int line, - const char *func, - const wxChar *cond, - const wxChar *msg = nullptr); - // these overloads work when msg passed to debug macro is a string and we // also have to provide wxCStrData overload to resolve ambiguity which would // otherwise arise from wxASSERT( s.c_str() ) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 316237a513..1467372f4c 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -1165,19 +1165,6 @@ void wxOnAssert(const wxString& file, wxTheAssertHandler(file, line, func, cond, wxString()); } -void wxOnAssert(const wxChar *file, - int line, - const char *func, - const wxChar *cond, - const wxChar *msg) -{ - // this is the backwards-compatible version - // so it could be called directly from the user code and this might happen - // even when wxTheAssertHandler is null - if ( wxTheAssertHandler ) - wxTheAssertHandler(file, line, func, cond, msg); -} - void wxOnAssert(const char *file, int line, const char *func,