Eagle Parser: Fix overwritten changes
This commit is contained in:
parent
b9973a1c67
commit
230e8978f5
|
@ -40,14 +40,14 @@
|
||||||
constexpr auto DEFAULT_ALIGNMENT = ETEXT::BOTTOM_LEFT;
|
constexpr auto DEFAULT_ALIGNMENT = ETEXT::BOTTOM_LEFT;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
string Convert<string>( wxString aValue )
|
string Convert<string>( const wxString& aValue )
|
||||||
{
|
{
|
||||||
return aValue.ToStdString();
|
return aValue.ToStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
double Convert<double>( wxString aValue )
|
double Convert<double>( const wxString& aValue )
|
||||||
{
|
{
|
||||||
double value;
|
double value;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ double Convert<double>( wxString aValue )
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int Convert<int>( wxString aValue )
|
int Convert<int>( const wxString& aValue )
|
||||||
{
|
{
|
||||||
if( aValue.IsEmpty() )
|
if( aValue.IsEmpty() )
|
||||||
throw XML_PARSER_ERROR( "Conversion to int failed. Original value is empty." );
|
throw XML_PARSER_ERROR( "Conversion to int failed. Original value is empty." );
|
||||||
|
@ -70,7 +70,7 @@ int Convert<int>( wxString aValue )
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool Convert<bool>( wxString aValue )
|
bool Convert<bool>( const wxString& aValue )
|
||||||
{
|
{
|
||||||
if( aValue != "yes" && aValue != "no" )
|
if( aValue != "yes" && aValue != "no" )
|
||||||
throw XML_PARSER_ERROR( "Conversion to bool failed. Original value, '" +
|
throw XML_PARSER_ERROR( "Conversion to bool failed. Original value, '" +
|
||||||
|
@ -84,7 +84,7 @@ bool Convert<bool>( wxString aValue )
|
||||||
/// parse an Eagle XML "rot" field. Unfortunately the DTD seems not to explain
|
/// parse an Eagle XML "rot" field. Unfortunately the DTD seems not to explain
|
||||||
/// this format very well. [S][M]R<degrees>. Examples: "R90", "MR180", "SR180"
|
/// this format very well. [S][M]R<degrees>. Examples: "R90", "MR180", "SR180"
|
||||||
template<>
|
template<>
|
||||||
EROT Convert<EROT>( wxString aRot )
|
EROT Convert<EROT>( const wxString& aRot )
|
||||||
{
|
{
|
||||||
EROT value;
|
EROT value;
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ public:
|
||||||
* type T is unknown.
|
* type T is unknown.
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T Convert( wxString aValue )
|
T Convert( const wxString& aValue )
|
||||||
{
|
{
|
||||||
throw XML_PARSER_ERROR( "Conversion failed. Unknown type." );
|
throw XML_PARSER_ERROR( "Conversion failed. Unknown type." );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue