From b87a7ab9e76ff5c8ee5e2e05f96432ff1d427bd7 Mon Sep 17 00:00:00 2001 From: PB Date: Mon, 9 Oct 2023 09:00:33 +0200 Subject: [PATCH] Remove wxNODISCARD from wxBasicString::Get() declaration Using both wxDEPRECATED_MSG and wxNODISCARD for some reason breaks compilation with clang (when using C++17 or newer standard). Since wxBasicString::Get() is deprecated, one warning should be enough so just remove wxNODISCARD from the method declaration. Closes #23952. --- include/wx/msw/ole/oleutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index 09c863b62a..b9e35babba 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -104,7 +104,7 @@ public: // retrieve a copy of our string - caller must SysFreeString() it later! wxDEPRECATED_MSG("use Copy() instead") - wxNODISCARD BSTR Get() const { return Copy(); } + BSTR Get() const { return Copy(); } private: // actual string BSTR m_bstrBuf;