From 8e367994d76855e50fc9138a4e0d76339e7005ff Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Feb 2022 02:55:01 +0100 Subject: [PATCH] Fix wxWebViewEdge build with standard-conforming compilers Convert wxCoTaskMemPtr to wxString explicitly as doing it implicitly required 2 user-defined conversions which is not allowed in standard C++ (but works with MSVC). Also get rid of a not really necessary temporary wxString variable and just perform this case when constructing wxStringTokenizer. Closes #22170. --- src/msw/webview_edge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/msw/webview_edge.cpp b/src/msw/webview_edge.cpp index 7afc2189ec..14738d3b30 100644 --- a/src/msw/webview_edge.cpp +++ b/src/msw/webview_edge.cpp @@ -989,8 +989,7 @@ wxVersionInfo wxWebViewFactoryEdge::GetVersionInfo() wxWebViewEdgeImpl::ms_browserExecutableDir.wc_str(), &nativeVersionStr); if (SUCCEEDED(hr) && nativeVersionStr) { - wxString versionStr = nativeVersionStr; - wxStringTokenizer tk(versionStr, ". "); + wxStringTokenizer tk(wxString(nativeVersionStr), ". "); // Ignore the return value because if the version component is missing // or invalid (i.e. non-numeric), the only thing we can do is to ignore // it anyhow.