From 2d1928e6aa65cc5a636fc3bd84167deb12ab2ccb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Oct 2022 19:51:09 +0100 Subject: [PATCH] Correct misleading comment for wxString::IsSameAs() overloads They can't be removed as doing it would result in errors when compiling any code using IsSameAs() due to ambiguous conversions. --- include/wx/string.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wx/string.h b/include/wx/string.h index 02bcde0a10..a402f2b739 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -2094,7 +2094,9 @@ public: { return IsSameAs(str.data(), compareWithCase); } // comparison with a single character: returns true if equal bool IsSameAs(wxUniChar c, bool compareWithCase = true) const; - // FIXME-UTF8: remove these overloads + // we need all these overloads too as any of the types below can be + // converted either to wxUniChar or wxString, so without them, calling + // IsSameAs('x') would result in an ambiguity. bool IsSameAs(wxUniCharRef c, bool compareWithCase = true) const { return IsSameAs(wxUniChar(c), compareWithCase); } bool IsSameAs(char c, bool compareWithCase = true) const