From a2609429a34dad58728ccac630b73dbe1c6d1617 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Mar 2020 15:52:26 +0100 Subject: [PATCH] Apply implicit encoding check to wxString::{starts,ends}_with() too Don't provide the overloads taking "const char*" when compiling with wxNO_IMPLICIT_WXSTRING_ENCODING is defined. --- include/wx/string.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/string.h b/include/wx/string.h index aaa46e6af4..68638d5dda 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3435,15 +3435,19 @@ public: bool starts_with(const wxString &str) const { return StartsWith(str); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool starts_with(const char *sz) const { return StartsWith(sz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool starts_with(const wchar_t *sz) const { return StartsWith(sz); } bool ends_with(const wxString &str) const { return EndsWith(str); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool ends_with(const char *sz) const { return EndsWith(sz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool ends_with(const wchar_t *sz) const { return EndsWith(sz); }