From 4f5f4af3b1246cdd66bcc11ce88ca63b0e2db9f9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Nov 2017 21:00:13 +0100 Subject: [PATCH] Compilation fixes for wxUSE_STL==1 build Add an explicit call to wc_str() in one place where conversion to wchar_t* is needed and use wxString::operator==() instead of lstrcmp() to avoid having to perform this conversion explicitly in another place. --- src/msw/graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index ed4f4e05bf..003eefd41e 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1000,7 +1000,7 @@ wxGDIPlusFontData::Init(const wxString& name, { wchar_t familyName[LF_FACESIZE]; int rc = gs_pFontFamily[j].GetFamilyName(familyName); - if ( rc == 0 && lstrcmp(name, familyName) == 0 ) + if ( rc == 0 && name == familyName ) { m_font = new Font(&gs_pFontFamily[j], size, style, fontUnit); break; @@ -1009,7 +1009,7 @@ wxGDIPlusFontData::Init(const wxString& name, } if ( !m_font ) - m_font = new Font(name, size, style, fontUnit); + m_font = new Font(name.wc_str(), size, style, fontUnit); m_textBrush = new SolidBrush(wxColourToColor(col)); }