Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+. This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future. In particular, MSVC becomes pedantic about ternary types. See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
This commit is contained in:
parent
6af3dadaee
commit
4665823089
|
@ -466,6 +466,9 @@ if( MSVC )
|
||||||
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /Gy" )
|
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /Gy" )
|
||||||
# Avoid fatal error because /GF + swig wrapper exceed standard obj file limits
|
# Avoid fatal error because /GF + swig wrapper exceed standard obj file limits
|
||||||
string( APPEND CMAKE_CXX_FLAGS " /bigobj" )
|
string( APPEND CMAKE_CXX_FLAGS " /bigobj" )
|
||||||
|
# /permissive-: This puts MSVC into compliance mode, this flag is default on with C++20
|
||||||
|
# but we want to turn it on to enable debug performance improvements available under C++17 in MSVC 17.5+
|
||||||
|
string( APPEND CMAKE_CXX_FLAGS " /permissive-" )
|
||||||
|
|
||||||
# Exception handling
|
# Exception handling
|
||||||
# Remove the potential default EHsc option cmake doesn't allow us to remove easily
|
# Remove the potential default EHsc option cmake doesn't allow us to remove easily
|
||||||
|
|
|
@ -276,7 +276,7 @@ bool LIB_ID::isLegalLibraryNameChar( unsigned aUniChar )
|
||||||
const wxString LIB_ID::GetFullLibraryName() const
|
const wxString LIB_ID::GetFullLibraryName() const
|
||||||
{
|
{
|
||||||
wxString suffix = m_subLibraryName.wx_str().IsEmpty()
|
wxString suffix = m_subLibraryName.wx_str().IsEmpty()
|
||||||
? wxS( "" )
|
? wxString( wxS( "" ) )
|
||||||
: wxString::Format( wxT( " - %s" ), m_subLibraryName.wx_str() );
|
: wxString::Format( wxT( " - %s" ), m_subLibraryName.wx_str() );
|
||||||
return wxString::Format( wxT( "%s%s" ), m_libraryName.wx_str(), suffix );
|
return wxString::Format( wxT( "%s%s" ), m_libraryName.wx_str(), suffix );
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,7 +581,7 @@ bool COMPILER::lexDefault( T_TOKEN& aToken )
|
||||||
|
|
||||||
const wxString formatNode( TREE_NODE* node )
|
const wxString formatNode( TREE_NODE* node )
|
||||||
{
|
{
|
||||||
return node->value.str ? *(node->value.str) : "";
|
return node->value.str ? *(node->value.str) : wxString( wxEmptyString );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1430,7 +1430,7 @@ public:
|
||||||
{
|
{
|
||||||
return aRefName
|
return aRefName
|
||||||
+ ( ( aAlternateName.size() > 0 ) ? ( wxT( " (" ) + aAlternateName + wxT( ")" ) )
|
+ ( ( aAlternateName.size() > 0 ) ? ( wxT( " (" ) + aAlternateName + wxT( ")" ) )
|
||||||
: wxT( "" ) );
|
: wxString( wxT( "" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ APP_PROGRESS_DIALOG::APP_PROGRESS_DIALOG( const wxString& aTitle, const wxString
|
||||||
int aMaximum, wxWindow* aParent,
|
int aMaximum, wxWindow* aParent,
|
||||||
bool aIndeterminateTaskBarStatus, int aStyle )
|
bool aIndeterminateTaskBarStatus, int aStyle )
|
||||||
: wxProgressDialog( aTitle,
|
: wxProgressDialog( aTitle,
|
||||||
aMessage == wxEmptyString ? wxT( " " ) : aMessage,
|
aMessage == wxEmptyString ? wxString( wxT( " " ) ) : aMessage,
|
||||||
aMaximum, aParent, aStyle )
|
aMaximum, aParent, aStyle )
|
||||||
#if wxCHECK_VERSION( 3, 1, 0 )
|
#if wxCHECK_VERSION( 3, 1, 0 )
|
||||||
,
|
,
|
||||||
|
|
|
@ -225,7 +225,7 @@ void DIALOG_RESCUE_EACH::PopulateInstanceList()
|
||||||
|
|
||||||
data.clear();
|
data.clear();
|
||||||
data.push_back( eachSymbol->GetRef( m_currentSheet ) );
|
data.push_back( eachSymbol->GetRef( m_currentSheet ) );
|
||||||
data.push_back( valueField ? valueField->GetText() : wxT( "" ) );
|
data.push_back( valueField ? valueField->GetText() : wxString( wxT( "" ) ) );
|
||||||
m_ListOfInstances->AppendItem( data );
|
m_ListOfInstances->AppendItem( data );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
EESCHEMA_SETTINGS* cfg = mgr.GetAppSettings<EESCHEMA_SETTINGS>();
|
EESCHEMA_SETTINGS* cfg = mgr.GetAppSettings<EESCHEMA_SETTINGS>();
|
||||||
|
|
||||||
cfg->m_Appearance.default_font = m_defaultFontCtrl->GetSelection() <= 0
|
cfg->m_Appearance.default_font = m_defaultFontCtrl->GetSelection() <= 0
|
||||||
? KICAD_FONT_NAME // This is a keyword. Do not translate
|
? wxString( KICAD_FONT_NAME ) // This is a keyword. Do not translate
|
||||||
: m_defaultFontCtrl->GetStringSelection();
|
: m_defaultFontCtrl->GetStringSelection();
|
||||||
cfg->m_Appearance.show_hidden_pins = m_checkShowHiddenPins->GetValue();
|
cfg->m_Appearance.show_hidden_pins = m_checkShowHiddenPins->GetValue();
|
||||||
cfg->m_Appearance.show_hidden_fields = m_checkShowHiddenFields->GetValue();
|
cfg->m_Appearance.show_hidden_fields = m_checkShowHiddenFields->GetValue();
|
||||||
|
|
|
@ -352,7 +352,7 @@ wxString SCH_CONNECTION::Name( bool aIgnoreSheet ) const
|
||||||
void SCH_CONNECTION::recacheName()
|
void SCH_CONNECTION::recacheName()
|
||||||
{
|
{
|
||||||
m_cached_name =
|
m_cached_name =
|
||||||
m_name.IsEmpty() ? wxT( "<NO NET>" ) : wxString( m_prefix ) << m_name << m_suffix;
|
m_name.IsEmpty() ? wxString( wxT( "<NO NET>" ) ) : wxString( m_prefix ) << m_name << m_suffix;
|
||||||
|
|
||||||
bool prepend_path = true;
|
bool prepend_path = true;
|
||||||
|
|
||||||
|
|
|
@ -1799,7 +1799,7 @@ SCH_SYMBOL* CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol( const SYMBOL& aCads
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString gate = ( aCadstarSymbol.GateID.IsEmpty() ) ? wxT( "A" ) : aCadstarSymbol.GateID;
|
wxString gate = ( aCadstarSymbol.GateID.IsEmpty() ) ? wxString( wxT( "A" ) ) : aCadstarSymbol.GateID;
|
||||||
wxString partGateIndex = aCadstarSymbol.PartRef.RefID + gate;
|
wxString partGateIndex = aCadstarSymbol.PartRef.RefID + gate;
|
||||||
|
|
||||||
//Handle pin swaps
|
//Handle pin swaps
|
||||||
|
|
|
@ -1871,7 +1871,7 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
||||||
// Get Device set information
|
// Get Device set information
|
||||||
EDEVICE_SET edeviceset = EDEVICE_SET( devicesetNode );
|
EDEVICE_SET edeviceset = EDEVICE_SET( devicesetNode );
|
||||||
|
|
||||||
wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : wxT( "" );
|
wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : wxString( wxT( "" ) );
|
||||||
|
|
||||||
NODE_MAP deviceSetChildren = MapChildren( devicesetNode );
|
NODE_MAP deviceSetChildren = MapChildren( devicesetNode );
|
||||||
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, wxT( "devices" ) );
|
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, wxT( "devices" ) );
|
||||||
|
@ -2380,7 +2380,7 @@ LIB_TEXT* SCH_EAGLE_PLUGIN::loadSymbolText( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
||||||
adjustedText += tmp;
|
adjustedText += tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
libtext->SetText( adjustedText.IsEmpty() ? wxT( "~" ) : adjustedText );
|
libtext->SetText( adjustedText.IsEmpty() ? wxString( wxT( "~" ) ) : adjustedText );
|
||||||
loadTextAttributes( libtext.get(), etext );
|
loadTextAttributes( libtext.get(), etext );
|
||||||
|
|
||||||
return libtext.release();
|
return libtext.release();
|
||||||
|
@ -2596,7 +2596,7 @@ SCH_TEXT* SCH_EAGLE_PLUGIN::loadPlainText( wxXmlNode* aSchText )
|
||||||
adjustedText += tmp;
|
adjustedText += tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
schtext->SetText( adjustedText.IsEmpty() ? wxT( "\" \"" ) : escapeName( adjustedText ) );
|
schtext->SetText( adjustedText.IsEmpty() ? wxString( wxT( "\" \"" ) ) : escapeName( adjustedText ) );
|
||||||
schtext->SetPosition( VECTOR2I( etext.x.ToSchUnits(), -etext.y.ToSchUnits() ) );
|
schtext->SetPosition( VECTOR2I( etext.x.ToSchUnits(), -etext.y.ToSchUnits() ) );
|
||||||
loadTextAttributes( schtext.get(), etext );
|
loadTextAttributes( schtext.get(), etext );
|
||||||
schtext->SetItalic( false );
|
schtext->SetItalic( false );
|
||||||
|
|
|
@ -755,7 +755,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler )
|
||||||
first.GetRef(),
|
first.GetRef(),
|
||||||
tmp,
|
tmp,
|
||||||
first.GetLibPart()->GetUnitCount() > 1 ?
|
first.GetLibPart()->GetUnitCount() > 1 ?
|
||||||
LIB_SYMBOL::SubReference( first.m_unit ) : wxT( "" ) );
|
LIB_SYMBOL::SubReference( first.m_unit ) : wxString( wxT( "" ) ) );
|
||||||
|
|
||||||
aHandler( ERCE_DUPLICATE_REFERENCE, msg, &first, &m_flatList[ii+1] );
|
aHandler( ERCE_DUPLICATE_REFERENCE, msg, &first, &m_flatList[ii+1] );
|
||||||
error++;
|
error++;
|
||||||
|
|
|
@ -1232,7 +1232,7 @@ bool SCH_SHEET::addInstance( const SCH_SHEET_PATH& aSheetPath )
|
||||||
|
|
||||||
wxLogTrace( traceSchSheetPaths, wxT( "Adding instance `%s` to sheet `%s`." ),
|
wxLogTrace( traceSchSheetPaths, wxT( "Adding instance `%s` to sheet `%s`." ),
|
||||||
aSheetPath.Path().AsString(),
|
aSheetPath.Path().AsString(),
|
||||||
( GetName().IsEmpty() ) ? wxT( "root" ) : GetName() );
|
( GetName().IsEmpty() ) ? wxString( wxT( "root" ) ) : GetName() );
|
||||||
|
|
||||||
SCH_SHEET_INSTANCE instance;
|
SCH_SHEET_INSTANCE instance;
|
||||||
|
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ void SCH_SHEET_LIST::UpdateSheetInstanceData( const std::vector<SCH_SHEET_INSTAN
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace( traceSchSheetPaths, "Setting sheet '%s' instance '%s' page number '%s'",
|
wxLogTrace( traceSchSheetPaths, "Setting sheet '%s' instance '%s' page number '%s'",
|
||||||
( sheet->GetName().IsEmpty() ) ? wxT( "root" ) : sheet->GetName(),
|
( sheet->GetName().IsEmpty() ) ? wxString( wxT( "root" ) ) : sheet->GetName(),
|
||||||
path.Path().AsString(), it->m_PageNumber );
|
path.Path().AsString(), it->m_PageNumber );
|
||||||
path.SetPageNumber( it->m_PageNumber );
|
path.SetPageNumber( it->m_PageNumber );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1265,17 +1265,19 @@ bool SCH_SYMBOL::ResolveTextVar( wxString* token, int aDepth ) const
|
||||||
}
|
}
|
||||||
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOM" ) ) )
|
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOM" ) ) )
|
||||||
{
|
{
|
||||||
*token = this->GetIncludeInBom() ? wxT( "" ) : _( "Excluded from BOM" );
|
*token = this->GetIncludeInBom() ? wxString( wxT( "" ) )
|
||||||
|
: _( "Excluded from BOM" );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOARD" ) ) )
|
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOARD" ) ) )
|
||||||
{
|
{
|
||||||
*token = this->GetIncludeOnBoard() ? wxT( "" ) : _( "Excluded from board" );
|
*token = this->GetIncludeOnBoard() ? wxString( wxT( "" ) )
|
||||||
|
: _( "Excluded from board" );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if( token->IsSameAs( wxT( "DNP" ) ) )
|
else if( token->IsSameAs( wxT( "DNP" ) ) )
|
||||||
{
|
{
|
||||||
*token = this->GetDNP() ? _( "DNP" ) : wxT( "" );
|
*token = this->GetDNP() ? _( "DNP" ) : wxString( wxT( "" ) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,22 +194,22 @@ public:
|
||||||
|
|
||||||
wxString GetLabelX() const
|
wxString GetLabelX() const
|
||||||
{
|
{
|
||||||
return m_axis_x ? m_axis_x->GetName() : wxS( "" );
|
return m_axis_x ? m_axis_x->GetName() : wxString( wxS( "" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLabelY1() const
|
wxString GetLabelY1() const
|
||||||
{
|
{
|
||||||
return m_axis_y1 ? m_axis_y1->GetName() : wxS( "" );
|
return m_axis_y1 ? m_axis_y1->GetName() : wxString( wxS( "" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLabelY2() const
|
wxString GetLabelY2() const
|
||||||
{
|
{
|
||||||
return m_axis_y2 ? m_axis_y2->GetName() : wxS( "" );
|
return m_axis_y2 ? m_axis_y2->GetName() : wxString( wxS( "" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetLabelY3() const
|
wxString GetLabelY3() const
|
||||||
{
|
{
|
||||||
return m_axis_y3 ? m_axis_y3->GetName() : wxS( "" );
|
return m_axis_y3 ? m_axis_y3->GetName() : wxString( wxS( "" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GetUnitsX() const;
|
wxString GetUnitsX() const;
|
||||||
|
|
|
@ -54,31 +54,39 @@ wxString SPICE_SIMULATOR::TypeToName( SIM_TYPE aType, bool aShortName )
|
||||||
switch( aType )
|
switch( aType )
|
||||||
{
|
{
|
||||||
case ST_OP:
|
case ST_OP:
|
||||||
return aShortName ? wxT( "OP" ) : _( "Operating Point" );
|
return aShortName ? wxString( wxT( "OP" ) )
|
||||||
|
: _( "Operating Point" );
|
||||||
|
|
||||||
case ST_AC:
|
case ST_AC:
|
||||||
return "AC";
|
return "AC";
|
||||||
|
|
||||||
case ST_DC:
|
case ST_DC:
|
||||||
return aShortName ? wxT( "DC" ) : _( "DC Sweep" );
|
return aShortName ? wxString( wxT( "DC" ) )
|
||||||
|
: _( "DC Sweep" );
|
||||||
|
|
||||||
case ST_TRANSIENT:
|
case ST_TRANSIENT:
|
||||||
return aShortName ? wxT( "TRAN" ) : _( "Transient" );
|
return aShortName ? wxString( wxT( "TRAN" ) )
|
||||||
|
: _( "Transient" );
|
||||||
|
|
||||||
case ST_DISTORTION:
|
case ST_DISTORTION:
|
||||||
return aShortName ? wxT( "DISTO" ) : _( "Distortion" );
|
return aShortName ? wxString( wxT( "DISTO" ) )
|
||||||
|
: _( "Distortion" );
|
||||||
|
|
||||||
case ST_NOISE:
|
case ST_NOISE:
|
||||||
return aShortName ? wxT( "NOISE" ) : _( "Noise" );
|
return aShortName ? wxString( wxT( "NOISE" ) )
|
||||||
|
: _( "Noise" );
|
||||||
|
|
||||||
case ST_POLE_ZERO:
|
case ST_POLE_ZERO:
|
||||||
return aShortName ? wxT( "PZ" ) : _( "Pole-zero" );
|
return aShortName ? wxString( wxT( "PZ" ) )
|
||||||
|
: _( "Pole-zero" );
|
||||||
|
|
||||||
case ST_SENSITIVITY:
|
case ST_SENSITIVITY:
|
||||||
return aShortName ? wxT( "SENS" ) : _( "Sensitivity" );
|
return aShortName ? wxString( wxT( "SENS" ) )
|
||||||
|
: _( "Sensitivity" );
|
||||||
|
|
||||||
case ST_TRANS_FUNC:
|
case ST_TRANS_FUNC:
|
||||||
return aShortName ? wxT( "TF" ) : _( "Transfer function" );
|
return aShortName ? wxString( wxT( "TF" ) )
|
||||||
|
: _( "Transfer function" );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case ST_UNKNOWN:
|
case ST_UNKNOWN:
|
||||||
|
|
|
@ -156,7 +156,7 @@ bool SYMBOL_TREE_MODEL_ADAPTER::AddLibraries( const std::vector<wxString>& aNick
|
||||||
|
|
||||||
for( const wxString& lib : subLibraries )
|
for( const wxString& lib : subLibraries )
|
||||||
{
|
{
|
||||||
wxString suffix = lib.IsEmpty() ? wxT( "" )
|
wxString suffix = lib.IsEmpty() ? wxString( wxT( "" ) )
|
||||||
: wxString::Format( wxT( " - %s" ), lib );
|
: wxString::Format( wxT( " - %s" ), lib );
|
||||||
wxString name = wxString::Format( wxT( "%s%s" ), pair.first, suffix );
|
wxString name = wxString::Format( wxT( "%s%s" ), pair.first, suffix );
|
||||||
wxString desc;
|
wxString desc;
|
||||||
|
|
|
@ -692,7 +692,7 @@ bool SYMBOL_VIEWER_FRAME::ReCreateLibList()
|
||||||
|
|
||||||
for( const wxString& lib : subLibraries )
|
for( const wxString& lib : subLibraries )
|
||||||
{
|
{
|
||||||
wxString suffix = lib.IsEmpty() ? wxT( "" )
|
wxString suffix = lib.IsEmpty() ? wxString( wxT( "" ) )
|
||||||
: wxString::Format( wxT( " - %s" ), lib );
|
: wxString::Format( wxT( " - %s" ), lib );
|
||||||
wxString name = wxString::Format( wxT( "%s%s" ), aLib, suffix );
|
wxString name = wxString::Format( wxT( "%s%s" ), aLib, suffix );
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ bool SYMBOL_VIEWER_FRAME::ReCreateLibList()
|
||||||
// If not found, clear current library selection because it can be deleted after a
|
// If not found, clear current library selection because it can be deleted after a
|
||||||
// config change.
|
// config change.
|
||||||
m_currentSymbol.SetLibNickname( m_libList->GetCount() > 0
|
m_currentSymbol.SetLibNickname( m_libList->GetCount() > 0
|
||||||
? m_libList->GetBaseString( 0 ) : wxT( "" ) );
|
? m_libList->GetBaseString( 0 ) : wxString( wxT( "" ) ) );
|
||||||
m_currentSymbol.SetLibItemName( wxEmptyString );
|
m_currentSymbol.SetLibItemName( wxEmptyString );
|
||||||
m_unit = 1;
|
m_unit = 1;
|
||||||
m_convert = LIB_ITEM::LIB_CONVERT::BASE;
|
m_convert = LIB_ITEM::LIB_CONVERT::BASE;
|
||||||
|
|
|
@ -130,7 +130,7 @@ int GERBVIEW_INSPECTION_TOOL::ShowDCodes( const TOOL_EVENT& aEvent )
|
||||||
pt_D_code->m_Size.y / scale, units,
|
pt_D_code->m_Size.y / scale, units,
|
||||||
pt_D_code->m_Size.x / scale, units,
|
pt_D_code->m_Size.x / scale, units,
|
||||||
D_CODE::ShowApertureType( pt_D_code->m_ApertType ),
|
D_CODE::ShowApertureType( pt_D_code->m_ApertType ),
|
||||||
pt_D_code->m_AperFunction.IsEmpty()? wxT( "none" ) : pt_D_code->m_AperFunction
|
pt_D_code->m_AperFunction.IsEmpty()? wxString( wxT( "none" ) ) : pt_D_code->m_AperFunction
|
||||||
);
|
);
|
||||||
|
|
||||||
if( !pt_D_code->m_Defined )
|
if( !pt_D_code->m_Defined )
|
||||||
|
|
|
@ -888,7 +888,7 @@ const wxString PLUGIN_CONTENT_MANAGER::GetPackageUpdateVersion( const PCM_PACKAG
|
||||||
&& installed_ver_it->parsed_version < ver.parsed_version;
|
&& installed_ver_it->parsed_version < ver.parsed_version;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return ver_it == aPackage.versions.end() ? wxT( "" ) : ver_it->version;
|
return ver_it == aPackage.versions.end() ? wxString( wxT( "" ) ) : ver_it->version;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t PLUGIN_CONTENT_MANAGER::getCurrentTimestamp() const
|
time_t PLUGIN_CONTENT_MANAGER::getCurrentTimestamp() const
|
||||||
|
|
|
@ -226,12 +226,12 @@ void PANEL_TRANSLINE::TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType )
|
||||||
|
|
||||||
wxASSERT ( data );
|
wxASSERT ( data );
|
||||||
data->name->SetToolTip( prm->m_ToolTip );
|
data->name->SetToolTip( prm->m_ToolTip );
|
||||||
data->name->SetLabel( prm->m_DlgLabel != "" ? prm->m_DlgLabel + ':' : "" );
|
data->name->SetLabel( prm->m_DlgLabel != wxS( "" ) ? prm->m_DlgLabel + wxS( ':' ) : wxString( wxS( "" ) ) );
|
||||||
prm->m_ValueCtrl = data->value;
|
prm->m_ValueCtrl = data->value;
|
||||||
|
|
||||||
if( prm->m_Id != DUMMY_PRM )
|
if( prm->m_Id != DUMMY_PRM )
|
||||||
{
|
{
|
||||||
data->value->SetValue( wxString::Format( "%g", prm->m_Value ) );
|
data->value->SetValue( wxString::Format( wxS( "%g" ), prm->m_Value ) );
|
||||||
data->value->Enable( true );
|
data->value->Enable( true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -135,7 +135,7 @@ void SpreadFootprints( std::vector<FOOTPRINT*>* aFootprints, VECTOR2I aTargetBox
|
||||||
for( FOOTPRINT* footprint : *aFootprints )
|
for( FOOTPRINT* footprint : *aFootprints )
|
||||||
{
|
{
|
||||||
wxString path =
|
wxString path =
|
||||||
aGroupBySheet ? footprint->GetPath().AsString().BeforeLast( '/' ) : wxS( "" );
|
aGroupBySheet ? footprint->GetPath().AsString().BeforeLast( '/' ) : wxString( wxS( "" ) );
|
||||||
|
|
||||||
VECTOR2I size = footprint->GetBoundingBox( false, false ).GetSize();
|
VECTOR2I size = footprint->GetBoundingBox( false, false ).GetSize();
|
||||||
size.x += aComponentGap;
|
size.x += aComponentGap;
|
||||||
|
|
|
@ -532,7 +532,7 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
|
||||||
change.NewRefDes,
|
change.NewRefDes,
|
||||||
ActionMessage[change.Action],
|
ActionMessage[change.Action],
|
||||||
UpdateRefDes != change.Action ? _( " will be ignored" )
|
UpdateRefDes != change.Action ? _( " will be ignored" )
|
||||||
: wxT( "" ) );
|
: wxString( wxT( "" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowReport( message, RPT_SEVERITY_INFO );
|
ShowReport( message, RPT_SEVERITY_INFO );
|
||||||
|
|
|
@ -292,7 +292,7 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile )
|
||||||
{
|
{
|
||||||
PCB_LAYER_ID layer = *seq;
|
PCB_LAYER_ID layer = *seq;
|
||||||
wxFileName fn( boardFilename );
|
wxFileName fn( boardFilename );
|
||||||
wxString suffix = aOnlyOneFile ? wxT( "brd" ) : m_board->GetStandardLayerName( layer );
|
wxString suffix = aOnlyOneFile ? wxString( wxT( "brd" ) ) : m_board->GetStandardLayerName( layer );
|
||||||
|
|
||||||
BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension );
|
BuildPlotFileName( &fn, outputDir.GetPath(), suffix, SVGFileExtension );
|
||||||
wxString svgPath = fn.GetFullPath();
|
wxString svgPath = fn.GetFullPath();
|
||||||
|
|
|
@ -714,7 +714,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponentLibrary()
|
||||||
SYMDEF_PCB component = symPair.second;
|
SYMDEF_PCB component = symPair.second;
|
||||||
wxString fpName = component.ReferenceName + ( ( component.Alternate.size() > 0 ) ?
|
wxString fpName = component.ReferenceName + ( ( component.Alternate.size() > 0 ) ?
|
||||||
( wxT( " (" ) + component.Alternate + wxT( ")" ) ) :
|
( wxT( " (" ) + component.Alternate + wxT( ")" ) ) :
|
||||||
wxT( "" ) );
|
wxString( wxT( "" ) ) );
|
||||||
|
|
||||||
// Check that we are not loading a documentation symbol.
|
// Check that we are not loading a documentation symbol.
|
||||||
// Documentation symbols in CADSTAR are graphical "footprints" that can be assigned
|
// Documentation symbols in CADSTAR are graphical "footprints" that can be assigned
|
||||||
|
|
|
@ -2140,7 +2140,7 @@ void PCB_PLUGIN::format( const ZONE* aZone, int aNestLevel ) const
|
||||||
m_out->Print( aNestLevel, "(zone%s (net %d) (net_name %s)",
|
m_out->Print( aNestLevel, "(zone%s (net %d) (net_name %s)",
|
||||||
locked.c_str(),
|
locked.c_str(),
|
||||||
has_no_net ? 0 : m_mapping->Translate( aZone->GetNetCode() ),
|
has_no_net ? 0 : m_mapping->Translate( aZone->GetNetCode() ),
|
||||||
m_out->Quotew( has_no_net ? wxT("") : aZone->GetNetname() ).c_str() );
|
m_out->Quotew( has_no_net ? wxString( wxT("") ) : aZone->GetNetname() ).c_str() );
|
||||||
|
|
||||||
// If a zone exists on multiple layers, format accordingly
|
// If a zone exists on multiple layers, format accordingly
|
||||||
if( aZone->GetLayerSet().count() > 1 )
|
if( aZone->GetLayerSet().count() > 1 )
|
||||||
|
|
|
@ -294,7 +294,7 @@ void DRAWING_TOOL::UpdateStatusBar() const
|
||||||
else
|
else
|
||||||
constrained = mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>()->m_Use45Limit;
|
constrained = mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>()->m_Use45Limit;
|
||||||
|
|
||||||
m_frame->DisplayConstraintsMsg( constrained ? _( "Constrain to H, V, 45" ) : wxT( "" ) );
|
m_frame->DisplayConstraintsMsg( constrained ? _( "Constrain to H, V, 45" ) : wxString( wxT( "" ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -345,7 +345,7 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, const wxString& aCommi
|
||||||
[editFrame]( bool constrained )
|
[editFrame]( bool constrained )
|
||||||
{
|
{
|
||||||
editFrame->DisplayConstraintsMsg( constrained ? _( "Constrain to H, V, 45" )
|
editFrame->DisplayConstraintsMsg( constrained ? _( "Constrain to H, V, 45" )
|
||||||
: wxT( "" ) );
|
: wxString( wxT( "" ) ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto updateStatusPopup =
|
auto updateStatusPopup =
|
||||||
|
|
Loading…
Reference in New Issue