Fix a few unused variable warnings on msvc

This commit is contained in:
Roberto Fernandez Bautista 2022-08-15 20:45:54 +01:00
parent 7155d1af29
commit 3e11506fa2
4 changed files with 17 additions and 17 deletions

View File

@ -117,7 +117,7 @@ SIM_MODEL::DEVICE_INFO SIM_MODEL::DeviceTypeInfo( DEVICE_TYPE_ aDeviceType )
SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
{
switch( aType )
{
{
case TYPE::NONE: return { DEVICE_TYPE_::NONE, "", "" };
case TYPE::R: return { DEVICE_TYPE_::R, "", "Ideal" };
@ -139,7 +139,7 @@ SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
case TYPE::SW_I: return { DEVICE_TYPE_::SW, "I", "Current-controlled" };
case TYPE::D: return { DEVICE_TYPE_::D, "", "" };
case TYPE::NPN_GUMMELPOON: return { DEVICE_TYPE_::NPN, "GUMMELPOON", "Gummel-Poon" };
case TYPE::PNP_GUMMELPOON: return { DEVICE_TYPE_::PNP, "GUMMELPOON", "Gummel-Poon" };
case TYPE::NPN_VBIC: return { DEVICE_TYPE_::NPN, "VBIC", "VBIC" };
@ -261,7 +261,7 @@ SIM_MODEL::SPICE_INFO SIM_MODEL::SpiceInfo( TYPE aType )
case TYPE::L: return { "L", "" };
//case TYPE::L_ADV: return { "L", "l" };
case TYPE::L_BEHAVIORAL: return { "L", "", "", "0", false, true };
case TYPE::TLINE_Z0: return { "T" };
case TYPE::TLINE_RLGC: return { "O", "ltra" };
@ -602,7 +602,7 @@ TYPE SIM_MODEL::InferTypeFromRefAndValue( const wxString& aRef, const wxString&
}
}
}
catch( const tao::pegtl::parse_error& e )
catch( const tao::pegtl::parse_error& )
{
}
@ -925,7 +925,7 @@ wxString SIM_MODEL::GenerateSpiceModelLine( const wxString& aModelName ) const
if( valueStr.IsEmpty() )
continue;
wxString append = " " + param.info.name + "=" + valueStr;
if( line.Length() + append.Length() > 60 )
@ -974,7 +974,7 @@ wxString SIM_MODEL::GenerateSpiceItemLine( const wxString& aRefName,
for( unsigned i = 0; i < aPinNetNames.size(); ++i )
{
unsigned symbolPinNumber = i + 1;
if( symbolPinNumber == pin.symbolPinNumber )
result << aPinNetNames[i] << " ";
}
@ -1142,7 +1142,7 @@ bool SIM_MODEL::SetParamValue( const wxString& aParamName, const wxString& aValu
{
return param.info.name == aParamName.Lower();
} );
if( it == params.end() )
return false;
@ -1281,7 +1281,7 @@ void SIM_MODEL::ParseParamsField( const wxString& aParamsField )
try
{
// Using parse tree instead of actions because we don't care about performance that much,
// and having a tree greatly simplifies some things.
// and having a tree greatly simplifies some things.
root = tao::pegtl::parse_tree::parse<
SIM_MODEL_PARSER::fieldParamValuePairsGrammar,
SIM_MODEL_PARSER::fieldParamValuePairsSelector>
@ -1300,7 +1300,7 @@ void SIM_MODEL::ParseParamsField( const wxString& aParamsField )
paramName = node->string();
// TODO: Do something with number<SIM_VALUE::TYPE_INT, ...>.
// It doesn't seem too useful?
else if( node->is_type<SIM_MODEL_PARSER::quotedStringContent>()
else if( node->is_type<SIM_MODEL_PARSER::quotedStringContent>()
|| node->is_type<SIM_MODEL_PARSER::unquotedString>() )
{
wxASSERT( paramName != "" );
@ -1400,7 +1400,7 @@ std::unique_ptr<SIM_MODEL> SIM_MODEL::create( TYPE aType )
case TYPE::V_BEHAVIORAL:
case TYPE::I_BEHAVIORAL:
return std::make_unique<SIM_MODEL_BEHAVIORAL>( aType );
case TYPE::TLINE_Z0:
case TYPE::TLINE_RLGC:
return std::make_unique<SIM_MODEL_TLINE>( aType );

View File

@ -136,7 +136,7 @@ void SIM_MODEL_IDEAL::inferredReadDataFields( unsigned aSymbolPinCount, const st
// The grammar and selector must guarantee having at least one child.
SetParamValue( 0, root->children[0]->string() );
}
catch( const tao::pegtl::parse_error& e )
catch( const tao::pegtl::parse_error& )
{
THROW_IO_ERROR( wxString::Format( _( "Failed to infer model from Value '%s'" ),
GetFieldValue( aFields, VALUE_FIELD ) ) );

View File

@ -123,7 +123,7 @@ wxString SIM_MODEL_SOURCE::GenerateSpiceItemLine( const wxString& aRefName,
SIM_MODEL_SOURCE_PARSER::pwlValuesSelector>
( in );
}
catch( const tao::pegtl::parse_error& e )
catch( const tao::pegtl::parse_error& )
{
break;
}

View File

@ -134,7 +134,7 @@ bool SIM_VALUE_GRAMMAR::IsValid( const wxString& aString,
{
CALL_INSTANCE( aValueType, aNotation, doIsValid, in );
}
catch( const tao::pegtl::parse_error& e )
catch( const tao::pegtl::parse_error& )
{
return false;
}
@ -200,7 +200,7 @@ SIM_VALUE_PARSER::PARSE_RESULT SIM_VALUE_PARSER::Parse( const wxString& aString,
{
CALL_INSTANCE( aValueType, aNotation, root = doParse, in );
}
catch( tao::pegtl::parse_error& e )
catch( tao::pegtl::parse_error& )
{
result.isOk = false;
return result;
@ -353,7 +353,7 @@ wxString SIM_VALUE_PARSER::ExponentToMetricSuffix( double aExponent, long& aRedu
aReductionExponent = 18;
return "E";
}
aReductionExponent = 0;
return "";
}
@ -381,7 +381,7 @@ std::unique_ptr<SIM_VALUE> SIM_VALUE::Create( TYPE aType )
case TYPE_FLOAT_VECTOR: return std::make_unique<SIM_VALUE_INST<double>>();
case TYPE_COMPLEX_VECTOR: return std::make_unique<SIM_VALUE_INST<std::complex<double>>>();
}
wxFAIL_MSG( _( "Unknown SIM_VALUE type" ) );
return nullptr;
}
@ -484,7 +484,7 @@ bool SIM_VALUE_INST<double>::FromString( const wxString& aString, NOTATION aNota
{
m_value = std::stod( parseResult.significand ) * std::pow( 10, exponent );
}
catch( const std::invalid_argument& e )
catch( const std::invalid_argument& )
{
return false;
}