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.
This commit is contained in:
Simon Richter 2017-09-19 21:00:06 +02:00 committed by Maciej Suminski
parent 1edaa8090d
commit 40ffb364df
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ bool LIB_PIN::Save( OUTPUTFORMATTER& aFormatter )
} }
if( aFormatter.Print( 0, " %s %d %d %d %c %d %d %d %d %c", 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, m_position.x, m_position.y,
(int) m_length, (int) m_orientation, m_numTextSize, m_nameTextSize, (int) m_length, (int) m_orientation, m_numTextSize, m_nameTextSize,
m_Unit, m_Convert, Etype ) < 0 ) m_Unit, m_Convert, Etype ) < 0 )