From ef87a0de54263540d015cd5313157baa35f24f5d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 11 Jan 2016 10:44:33 -0500 Subject: [PATCH] Fix build errors when casting wxString to const char * with some compilers. --- common/kicad_curl/kicad_curl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/kicad_curl/kicad_curl.cpp b/common/kicad_curl/kicad_curl.cpp index bf7ff37702..0977f28c80 100644 --- a/common/kicad_curl/kicad_curl.cpp +++ b/common/kicad_curl/kicad_curl.cpp @@ -104,7 +104,7 @@ void KICAD_CURL::Init() { // Failure: error reporting UI was done via wxLogSysError(). std::string msg = StrPrintf( "%s not wxDynamicLibrary::Load()ed", - canonicalName ); + static_cast< const char *>( canonicalName.mb_str() ) ); THROW_IO_ERROR( msg ); } @@ -120,9 +120,8 @@ void KICAD_CURL::Init() // No further reporting required here. std::string msg = StrPrintf( "%s has no function %s", - static_cast( canonicalName ), - dyn_funcs[i].name - ); + static_cast( canonicalName.mb_str() ), + dyn_funcs[i].name ); THROW_IO_ERROR( msg ); }