Attempt to fix GCC MSYS2 build crash

Initialize ngspice_models.cpp structures at runtime on demand. Use
a sequence of std::vector::emplace_back() instead of
brace-initialization.
This commit is contained in:
Mikolaj Wielgus 2022-08-02 14:43:03 +02:00
parent c815847b1e
commit 5d64fc12a1
3 changed files with 7985 additions and 8382 deletions

View File

@ -523,7 +523,7 @@ wxPGProperty* DIALOG_SIM_MODEL<T>::newParamProperty( int aParamIndex ) const
const SIM_MODEL::PARAM& param = curModel().GetParam( aParamIndex );
wxString paramDescription;
if( !param.info.description.IsEmpty() )
if( param.info.description == "" )
paramDescription = wxString::Format( "%s (%s)",
param.info.description,
param.info.name );

File diff suppressed because it is too large Load Diff

View File

@ -358,6 +358,36 @@ public:
bool isSpiceInstanceParam = false;
bool isInstanceParam = false;
wxString spiceInstanceName = "";
// TODO: Stop using brace-initializers, use this constructor for all info structs.
INFO( wxString aName = "",
unsigned aId = 0,
DIR aDir = DIR_INOUT,
SIM_VALUE::TYPE aType = SIM_VALUE::TYPE_FLOAT,
FLAGS aFlags = {},
std::string aUnit = "",
CATEGORY aCategory = CATEGORY::PRINCIPAL,
const wxString& aDefaultValue = "",
const wxString& aDefaultValueOfOtherVariant = "",
const wxString& aDescription = "",
bool aIsSpiceInstanceParam = false,
bool aIsInstanceParam = false,
wxString aSpiceInstanceName = "" ) :
name( aName ),
id( aId ),
dir( aDir ),
type( aType ),
flags( aFlags ),
unit( aUnit ),
category( aCategory ),
defaultValue( aDefaultValue ),
defaultValueOfOtherVariant( aDefaultValueOfOtherVariant ),
description( aDescription ),
isSpiceInstanceParam( aIsSpiceInstanceParam ),
isInstanceParam( aIsInstanceParam ),
spiceInstanceName( aSpiceInstanceName )
{
}
};
std::unique_ptr<SIM_VALUE> value;