From 40ffb364dfcdc87d6769c49932a5527aac7ec2c1 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Tue, 19 Sep 2017 21:00:06 +0200 Subject: [PATCH] Avoid converting fixed string to UTF-8 This fixes a build error on MSVC. The code may actually be legal, but a proof of that would require a lengthy dissertation on argument promotion rules for the ternary operator, and the simplest rule of promoting both cases to a wxString rvalue is not likely to be what is intended here. Fortunately, this expression can be simplified. --- eeschema/lib_pin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index f3213cc7a8..786181f827 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -585,7 +585,7 @@ bool LIB_PIN::Save( OUTPUTFORMATTER& aFormatter ) } if( aFormatter.Print( 0, " %s %d %d %d %c %d %d %d %d %c", - TO_UTF8( m_number.IsEmpty() ? wxT( "~" ) : m_number ), + m_number.IsEmpty() ? "~" : TO_UTF8( m_number ), m_position.x, m_position.y, (int) m_length, (int) m_orientation, m_numTextSize, m_nameTextSize, m_Unit, m_Convert, Etype ) < 0 )