Use wxEmptyString instead of wxT( "" )

Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
This commit is contained in:
Seth Hillbrand 2022-02-09 10:33:52 -08:00
parent 54f91a0221
commit 861589d837
65 changed files with 162 additions and 159 deletions

View File

@ -324,7 +324,7 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
else
path.Assign( aPath, wxT( "" ) );
path.Assign( aPath, wxEmptyString );
path.Normalize();

View File

@ -324,7 +324,7 @@ void ADVANCED_CFG::loadFromConfigFile()
wxLogTrace( AdvancedConfigMask, wxT( "Loading advanced config from: %s" ), k_advanced.GetFullPath() );
wxFileConfig file_cfg( wxT( "" ), wxT( "" ), k_advanced.GetFullPath() );
wxFileConfig file_cfg( wxEmptyString, wxEmptyString, k_advanced.GetFullPath() );
loadSettings( file_cfg );
}
@ -414,8 +414,8 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks = wxT( "" );
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, wxT( "" ) ) );
wxString traceMasks = wxEmptyString;
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, wxEmptyString ) );
// Load the config from file
wxConfigLoadSetups( &aCfg, configParams );

View File

@ -404,7 +404,7 @@ void PARAM_CFG_WXSTRING_SET::ReadParam( wxConfigBase* aConfig ) const
key = m_Ident;
key << i;
data = aConfig->Read( key, wxT( "" ) );
data = aConfig->Read( key, wxEmptyString );
if( data.IsEmpty() )
break;
@ -494,7 +494,7 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) const
id_lib = m_Ident;
id_lib << indexlib;
indexlib++;
libname = aConfig->Read( id_lib, wxT( "" ) );
libname = aConfig->Read( id_lib, wxEmptyString );
if( libname.IsEmpty() )
break;

View File

@ -38,7 +38,7 @@ DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL( wxWindow* aParent,
"any designators that already exist in the design." ) );
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::KEEP_ANNOTATIONS ),
wxT( "" ) ); // Self explanatory
wxEmptyString ); // Self explanatory
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::REMOVE_ANNOTATIONS ),
wxString::Format( _( "Replaces reference designators "

View File

@ -111,7 +111,7 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
if( m_pinMapSpecialCase )
{
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxT( "" ), _( "Ignore" ) };
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxEmptyString, _( "Ignore" ) };
int errorCode = m_pinMapSpecialCase->GetErrorCode();
wxString msg = m_pinMapSpecialCase->GetErrorText();
@ -123,9 +123,9 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
for( size_t i = 0; i < 3; ++i )
{
if( pinMapSeverities[i] == wxT( "" ) )
if( pinMapSeverities[i] == wxEmptyString )
{
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxT( "" ) );
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxEmptyString );
radioSizer->Add( spacer, 0, wxRIGHT | wxEXPAND, 17 );
}
else

View File

@ -142,12 +142,12 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
}
else if( token->IsSameAs( wxT( "PAPER" ) ) )
{
*token = m_paperFormat ? *m_paperFormat : wxString( wxT( "" ) );
*token = m_paperFormat ? *m_paperFormat : wxString( wxEmptyString );
tokenUpdated = true;
}
else if( token->IsSameAs( wxT( "LAYER" ) ) )
{
*token = m_sheetLayer ? *m_sheetLayer : wxString( wxT( "" ) );
*token = m_sheetLayer ? *m_sheetLayer : wxString( wxEmptyString );
tokenUpdated = true;
}
else if( m_titleBlock )

View File

@ -234,7 +234,7 @@ bool EDA_PATTERN_MATCH_RELATIONAL::SetPattern( const wxString& aPattern )
else
return false;
if( val == wxT( "" ) )
if( val == wxEmptyString )
{
// Matching on empty values keeps the match list from going empty when
// the user types the relational operator character, which helps prevent
@ -337,7 +337,7 @@ const std::map<wxString, double> EDA_PATTERN_MATCH_RELATIONAL::m_units = {
{ wxT( "n" ), 1e-9 },
{ wxT( "u" ), 1e-6 },
{ wxT( "m" ), 1e-3 },
{ wxT( "" ), 1. },
{ wxEmptyString, 1. },
{ wxT( "k" ), 1e3 },
{ wxT( "meg" ),1e6 },
{ wxT( "g" ), 1e9 },

View File

@ -141,7 +141,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
if( aProject )
return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() );
else
return NormalizePath( aFilePath, aEnvVars, wxT( "" ) );
return NormalizePath( aFilePath, aEnvVars, wxEmptyString );
}

View File

@ -64,7 +64,7 @@ bool FILENAME_RESOLVER::Set3DConfigDir( const wxString& aConfigDir )
if( aConfigDir.empty() )
return false;
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxT( "" ) );
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
cfgdir.Normalize();
@ -85,7 +85,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
if( !aProject )
return false;
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), wxT( "" ) );
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), wxEmptyString );
projdir.Normalize();
@ -188,7 +188,7 @@ bool FILENAME_RESOLVER::createPathList()
}
else
{
fndummy.Assign( pathVal, wxT( "" ) );
fndummy.Assign( pathVal, wxEmptyString );
fndummy.Normalize();
lpath.m_Pathexp = fndummy.GetFullPath();
}
@ -308,7 +308,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
// users can potentially override a model within ${KICAD6_3DMODEL_DIR}.
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( wxT( ":" ) ) )
{
tmpFN.Assign( m_paths.begin()->m_Pathexp, wxT( "" ) );
tmpFN.Assign( m_paths.begin()->m_Pathexp, wxEmptyString );
wxString fullPath = tmpFN.GetPathWithSep() + tname;
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
@ -420,7 +420,7 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
#endif
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), wxT( "" ) );
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), wxEmptyString );
path.Normalize();
@ -713,7 +713,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
SEARCH_PATH lpath;
lpath.m_Alias = envar;
lpath.m_Pathvar = lpath.m_Alias;
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), wxT( "" ) );
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), wxEmptyString );
wxUniChar psep = tmpFN.GetPathSeparator();
tmpFN.Normalize();
@ -768,11 +768,11 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
continue;
}
fpath.Assign( tpath, wxT( "" ) );
fpath.Assign( tpath, wxEmptyString );
}
else
{
fpath.Assign( sL->m_Pathexp, wxT( "" ) );
fpath.Assign( sL->m_Pathexp, wxEmptyString );
}
wxString fps = fpath.GetPathWithSep();

View File

@ -336,7 +336,7 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
{
wxString retVal = wxEmptyString;
wxFrame* testFrame = new wxFrame( nullptr, wxID_ANY, wxT( "" ), wxDefaultPosition,
wxFrame* testFrame = new wxFrame( nullptr, wxID_ANY, wxEmptyString, wxDefaultPosition,
wxSize( 1, 1 ), wxFRAME_TOOL_WINDOW | wxNO_BORDER );
KIGFX::OPENGL_GAL* opengl_gal = nullptr;

View File

@ -536,7 +536,7 @@ std::string FormatStringToGerber( const wxString& aString )
// Netname and Pan num fields cannot be empty in Gerber files
// Normalized names must be used, if any
#define NO_NET_NAME wxT( "N/C" ) // net name of not connected pads (one pad net) (normalized)
#define NO_PAD_NAME wxT( "" ) // pad name of pads without pad name/number (not normalized)
#define NO_PAD_NAME wxEmptyString // pad name of pads without pad name/number (not normalized)
bool FormatNetAttribute( std::string& aPrintedText, std::string& aLastNetAttributes,

View File

@ -112,14 +112,14 @@ static struct hotkey_name_descr hotkeyNameList[] =
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "" ), 0 },
{ wxEmptyString, 0 },
{ wxT( "Click" ), PSEUDO_WXK_CLICK },
{ wxT( "DblClick" ), PSEUDO_WXK_DBLCLICK },
{ wxT( "Wheel" ), PSEUDO_WXK_WHEEL },
// Do not change this line: end of list
{ wxT( "" ), KEY_NON_FOUND }
{ wxEmptyString, KEY_NON_FOUND }
};

View File

@ -263,7 +263,7 @@ wxString PATHS::GetStockPlugins3DPath()
// KICAD_PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
fn.Assign( tfname, wxT( "" ) );
fn.Assign( tfname, wxEmptyString );
fn.AppendDir( wxT( "kicad" ) );
fn.AppendDir( wxT( "plugins" ) );
#elif defined( __WXMAC__ )

View File

@ -98,7 +98,7 @@ LANGUAGE_DESCR LanguagesList[] =
wxT( "简体中文" ), true },
{ wxLANGUAGE_CHINESE_TRADITIONAL, ID_LANGUAGE_CHINESE_TRADITIONAL,
wxT( "繁體中文" ), false },
{ 0, 0, wxT( "" ), false } // Sentinel
{ 0, 0, wxEmptyString, false } // Sentinel
};
#undef _
#define _(s) wxGetTranslation((s))

View File

@ -250,7 +250,7 @@ bool GERBER_PLOTTER::StartPlot()
// Create a temp file in system temp to avoid potential network share buffer issues for
// the final read and save.
m_workFilename = wxFileName::CreateTempFileName( wxT( "" ) );
m_workFilename = wxFileName::CreateTempFileName( wxEmptyString );
workFile = wxFopen( m_workFilename, wxT( "wt" ));
m_outputFile = workFile;
wxASSERT( m_outputFile );

View File

@ -80,7 +80,7 @@ public:
else
{
m_error = true;
return wxString( wxT( "" ) );
return wxString( wxEmptyString );
}
}

View File

@ -1403,7 +1403,7 @@ public:
{
return aRefName
+ ( ( aAlternateName.size() > 0 ) ? ( wxT( " (" ) + aAlternateName + wxT( ")" ) )
: wxT( "" ) );
: wxString() );
}

View File

@ -221,7 +221,7 @@ void drawTicksAlongLine( KIGFX::VIEW* aView, const VECTOR2D& aOrigin, const VECT
if( drawLabel )
{
wxString label = DimensionLabel( wxT( "" ), tickSpace * i, aUnits, false );
wxString label = DimensionLabel( wxEmptyString, tickSpace * i, aUnits, false );
gal->SetLineWidth( textThickness );
gal->StrokeText( label, tickPos + labelOffset, labelAngle );
}

View File

@ -183,7 +183,7 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
wxLogNull doNotLog;
wxConfigBase::DontCreateOnDemand();
auto cfg = std::make_unique<wxFileConfig>( wxT( "" ), wxT( "" ), aPath.GetFullPath() );
auto cfg = std::make_unique<wxFileConfig>( wxEmptyString, wxEmptyString, aPath.GetFullPath() );
// If migrate fails or is not implemented, fall back to built-in defaults that were
// already loaded above

View File

@ -335,7 +335,7 @@ bool PGM_SINGLE_TOP::OnPgmInit()
} frameTypes[] = {
{ wxT( "pcb" ), FRAME_PCB_EDITOR },
{ wxT( "fpedit" ), FRAME_FOOTPRINT_EDITOR },
{ wxT( "" ), FRAME_T_COUNT }
{ wxEmptyString, FRAME_T_COUNT }
};
wxString frameName;

View File

@ -149,7 +149,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
if( c == '/' )
converted += wxT( "{slash}" );
else if( c == '\n' || c == '\r' )
converted += wxT( "" ); // drop
converted += wxEmptyString; // drop
else
converted += c;
}
@ -170,7 +170,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
else if( c == '\"' )
converted += wxT( "{dblquote}" );
else if( c == '\n' || c == '\r' )
converted += wxT( "" ); // drop
converted += wxEmptyString; // drop
else
converted += c;
}

View File

@ -123,7 +123,7 @@ void FOOTPRINT_CHOICE::OnDrawItem( wxDC& aDC, wxRect const& aRect, int aItem, in
wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
{
if( SafeGetString( aItem ) == wxT( "" ) )
if( SafeGetString( aItem ) == wxEmptyString )
return 11;
else
return wxOwnerDrawnComboBox::OnMeasureItem( aItem );
@ -132,7 +132,7 @@ wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
wxCoord FOOTPRINT_CHOICE::OnMeasureItemWidth( size_t aItem ) const
{
if( SafeGetString( aItem ) == wxT( "" ) )
if( SafeGetString( aItem ) == wxEmptyString )
return GetTextRect().GetWidth() - 2;
else
return wxOwnerDrawnComboBox::OnMeasureItemWidth( aItem );
@ -150,7 +150,7 @@ void FOOTPRINT_CHOICE::TryVetoMouse( wxMouseEvent& aEvent )
{
int item = GetVListBoxComboPopup()->VirtualHitTest( aEvent.GetPosition().y );
if( SafeGetString( item ) != wxT( "" ) )
if( SafeGetString( item ) != wxEmptyString )
aEvent.Skip();
}
@ -163,7 +163,7 @@ void FOOTPRINT_CHOICE::TryVetoSelect( wxCommandEvent& aEvent, bool aInner )
{
wxString text = SafeGetString( sel );
if( text == wxT( "" ) )
if( text == wxEmptyString )
{
SetSelectionEither( aInner, m_last_selection );
}

View File

@ -33,7 +33,7 @@ WX_PROGRESS_REPORTER::WX_PROGRESS_REPORTER( wxWindow* aParent, const wxString& a
int aNumPhases, bool aCanAbort,
bool aReserveSpaceForMessage ) :
PROGRESS_REPORTER_BASE( aNumPhases ),
wxProgressDialog( aTitle, ( aReserveSpaceForMessage ? wxT( " " ) : wxT( "" ) ), 1, aParent,
wxProgressDialog( aTitle, ( aReserveSpaceForMessage ? wxT( " " ) : wxEmptyString ), 1, aParent,
// wxPD_APP_MODAL | // Don't use; messes up OSX when called from
// quasi-modal dialog
wxPD_AUTO_HIDE | // *MUST* use; otherwise wxWidgets will spin

View File

@ -55,13 +55,13 @@ wxString GetQuotedText( wxString& text )
int i = text.Find( QUOTE );
if( wxNOT_FOUND == i )
return wxT( "" );
return wxEmptyString;
wxString shrt = text.Mid( i + 1 );
i = shrt.Find( QUOTE );
if( wxNOT_FOUND == i )
return wxT( "" );
return wxEmptyString;
text = shrt.Mid( i + 1 );
return shrt.Mid( 0, i );

View File

@ -399,7 +399,7 @@ void DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded( wxStyledTextEvent &aEven
{
wxString text = m_StyledTextCtrl->GetText();
int currpos = m_StyledTextCtrl->GetCurrentPos();
text.Replace( wxT( "\n" ), wxT( "" ) );
text.Replace( wxT( "\n" ), wxEmptyString );
m_StyledTextCtrl->SetText( text );
m_StyledTextCtrl->GotoPos( currpos-1 );
return;

View File

@ -223,7 +223,7 @@ void DIALOG_RESCUE_EACH::PopulateInstanceList()
data.clear();
data.push_back( eachSymbol->GetRef( m_currentSheet ) );
data.push_back( valueField ? valueField->GetText() : wxT( "" ) );
data.push_back( valueField ? valueField->GetText() : wxString() );
m_ListOfInstances->AppendItem( data );
count++;
}

View File

@ -1402,7 +1402,7 @@ void SCH_EDIT_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
wxString tmp = recoveredFn.GetName();
// Strip "_autosave-" prefix from the auto save file name.
tmp.Replace( GetAutoSaveFilePrefix(), wxT( "" ), false );
tmp.Replace( GetAutoSaveFilePrefix(), wxEmptyString, false );
recoveredFn.SetName( tmp );
wxFileName backupFn = recoveredFn;

View File

@ -1521,7 +1521,7 @@ void SCH_EDIT_FRAME::UpdateNetHighlightStatus()
}
else
{
SetStatusText( wxT( "" ) );
SetStatusText( wxEmptyString );
}
}

View File

@ -108,9 +108,9 @@ ASCH_SYMBOL::ASCH_SYMBOL( const std::map<wxString, wxString>& aProps )
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::COMPONENT );
currentpartid = ALTIUM_PARSER::ReadInt( aProps, wxT( "CURRENTPARTID" ), ALTIUM_COMPONENT_NONE );
libreference = ALTIUM_PARSER::ReadString( aProps, wxT( "LIBREFERENCE" ), wxT( "" ) );
sourcelibraryname = ALTIUM_PARSER::ReadString( aProps, wxT( "SOURCELIBRARYNAME" ), wxT( "" ) );
componentdescription = ALTIUM_PARSER::ReadString( aProps, wxT( "COMPONENTDESCRIPTION" ), wxT( "" ) );
libreference = ALTIUM_PARSER::ReadString( aProps, wxT( "LIBREFERENCE" ), wxEmptyString );
sourcelibraryname = ALTIUM_PARSER::ReadString( aProps, wxT( "SOURCELIBRARYNAME" ), wxEmptyString );
componentdescription = ALTIUM_PARSER::ReadString( aProps, wxT( "COMPONENTDESCRIPTION" ), wxEmptyString );
orientation = ALTIUM_PARSER::ReadInt( aProps, wxT( "ORIENTATION" ), 0 );
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );
@ -131,9 +131,9 @@ ASCH_PIN::ASCH_PIN( const std::map<wxString, wxString>& aProps )
ownerpartid = ReadOwnerPartId( aProps );
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
designator = ALTIUM_PARSER::ReadString( aProps, wxT( "DESIGNATOR" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxEmptyString );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
designator = ALTIUM_PARSER::ReadString( aProps, wxT( "DESIGNATOR" ), wxEmptyString );
int symbolOuterInt = ALTIUM_PARSER::ReadInt( aProps, wxT( "SYMBOL_OUTER" ), 0 );
symbolOuter = static_cast<ASCH_PIN_SYMBOL_OUTER>( symbolOuterInt );
@ -214,7 +214,7 @@ ASCH_LABEL::ASCH_LABEL( const std::map<wxString, wxString>& aProps )
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
fontId = ALTIUM_PARSER::ReadInt( aProps, wxT( "FONTID" ), 0 );
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );
@ -237,7 +237,7 @@ ASCH_TEXT_FRAME::ASCH_TEXT_FRAME( const std::map<wxString, wxString>& aProps )
size = wxSize( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ) - location.x,
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) - location.y );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
text.Replace( wxT( "~1" ), wxT( "\n" ), true );
fontId = ALTIUM_PARSER::ReadInt( aProps, wxT( "FONTID" ), 0 );
@ -256,7 +256,7 @@ ASCH_NOTE::ASCH_NOTE( const std::map<wxString, wxString>& aProperties ) :
{
wxASSERT( ReadRecord( aProperties ) == ALTIUM_SCH_RECORD::NOTE );
author = ALTIUM_PARSER::ReadString( aProperties, wxT( "AUTHOR" ), wxT( "" ) );
author = ALTIUM_PARSER::ReadString( aProperties, wxT( "AUTHOR" ), wxEmptyString );
}
@ -444,7 +444,7 @@ ASCH_SHEET_ENTRY::ASCH_SHEET_ENTRY( const std::map<wxString, wxString>& aProps )
side = ReadEnum<ASCH_SHEET_ENTRY_SIDE>( aProps, wxT( "SIDE" ), 0, 3, ASCH_SHEET_ENTRY_SIDE::LEFT );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxEmptyString );
iotype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, wxT( "IOTYPE" ), 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
style = ReadEnum<ASCH_PORT_STYLE>( aProps, wxT( "STYLE" ), 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
@ -463,7 +463,7 @@ ASCH_POWER_PORT::ASCH_POWER_PORT( const std::map<wxString, wxString>& aProps )
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
showNetName = ALTIUM_PARSER::ReadBool( aProps, wxT( "SHOWNETNAME" ), true );
style = ReadEnum<ASCH_POWER_PORT_STYLE>( aProps, wxT( "STYLE" ), 0, 10,
@ -479,8 +479,8 @@ ASCH_PORT::ASCH_PORT( const std::map<wxString, wxString>& aProps )
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
harnessType = ALTIUM_PARSER::ReadString( aProps, wxT( "HARNESSTYPE" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxEmptyString );
harnessType = ALTIUM_PARSER::ReadString( aProps, wxT( "HARNESSTYPE" ), wxEmptyString );
width = ReadKiCadUnitFrac( aProps, wxT( "WIDTH" ) );
height = ReadKiCadUnitFrac( aProps, wxT( "HEIGHT" ) );
@ -506,7 +506,7 @@ ASCH_NET_LABEL::ASCH_NET_LABEL( const std::map<wxString, wxString>& aProps )
{
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NET_LABEL );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
@ -572,7 +572,7 @@ ASCH_IMAGE::ASCH_IMAGE( const std::map<wxString, wxString>& aProps )
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, wxT( "INDEXINSHEET" ), 0 );
ownerpartid = ReadOwnerPartId( aProps );
filename = ALTIUM_PARSER::ReadString( aProps, wxT( "FILENAME" ), wxT( "" ) );
filename = ALTIUM_PARSER::ReadString( aProps, wxT( "FILENAME" ), wxEmptyString );
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
@ -590,7 +590,7 @@ ASCH_SHEET_FONT::ASCH_SHEET_FONT( const std::map<wxString, wxString>& aProps, in
const wxString sid = std::to_string( aId );
fontname = ALTIUM_PARSER::ReadString( aProps, wxT( "FONTNAME" ) + sid, wxT( "" ) );
fontname = ALTIUM_PARSER::ReadString( aProps, wxT( "FONTNAME" ) + sid, wxEmptyString );
size = ReadKiCadUnitFrac( aProps, wxT( "SIZE" ) + sid );
rotation = ALTIUM_PARSER::ReadInt( aProps, wxT( "ROTATION" ) + sid, 0 );
@ -650,7 +650,7 @@ ASCH_SHEET_NAME::ASCH_SHEET_NAME( const std::map<wxString, wxString>& aProps )
ownerindex = ReadOwnerIndex( aProps );
ownerpartid = ReadOwnerPartId( aProps );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
@ -669,7 +669,7 @@ ASCH_FILE_NAME::ASCH_FILE_NAME( const std::map<wxString, wxString>& aProps )
ownerindex = ReadOwnerIndex( aProps );
ownerpartid = ReadOwnerPartId( aProps );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
@ -688,8 +688,8 @@ ASCH_DESIGNATOR::ASCH_DESIGNATOR( const std::map<wxString, wxString>& aProps )
ownerindex = ReadOwnerIndex( aProps );
ownerpartid = ReadOwnerPartId( aProps );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxEmptyString );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, wxT( "JUSTIFICATION" ), 0, 8,
ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
@ -707,9 +707,9 @@ ASCH_IMPLEMENTATION::ASCH_IMPLEMENTATION( const std::map<wxString, wxString>& aP
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::IMPLEMENTATION );
ownerindex = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERINDEX" ), ALTIUM_COMPONENT_NONE );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELNAME" ), wxT( "" ) );
type = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELTYPE" ), wxT( "" ) );
libname = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELDATAFILE0" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELNAME" ), wxEmptyString );
type = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELTYPE" ), wxEmptyString );
libname = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELDATAFILE0" ), wxEmptyString );
isCurrent = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISCURRENT" ), false );
}
@ -748,8 +748,8 @@ ASCH_PARAMETER::ASCH_PARAMETER( const std::map<wxString, wxString>& aProps )
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxEmptyString );
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxEmptyString );
isHidden = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISHIDDEN" ), false );
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );

View File

@ -293,7 +293,7 @@ void SCH_ALTIUM_PLUGIN::ParseStorage( const CFB::CompoundFileReader& aReader )
ALTIUM_PARSER reader( aReader, file );
std::map<wxString, wxString> properties = reader.ReadProperties();
wxString header = ALTIUM_PARSER::ReadString( properties, wxT( "HEADER" ), wxT( "" ) );
wxString header = ALTIUM_PARSER::ReadString( properties, wxT( "HEADER" ), wxEmptyString );
int weight = ALTIUM_PARSER::ReadInt( properties, wxT( "WEIGHT" ), 0 );
if( weight < 0 )
@ -567,7 +567,7 @@ void SCH_ALTIUM_PLUGIN::ParseComponent( int aIndex,
// TODO: this is a hack until we correctly apply all transformations to every element
wxString name = wxString::Format( wxT( "%d%s_%s" ),
elem.orientation,
elem.isMirrored ? wxT( "_mirrored" ) : wxT( "" ),
elem.isMirrored ? wxT( "_mirrored" ) : wxEmptyString,
elem.libreference );
LIB_ID libId = AltiumToKiCadLibID( getLibName(), name );

View File

@ -1296,7 +1296,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
wxString libraryname = epart->library;
wxString gatename = epart->deviceset + epart->device + einstance.gate;
wxString symbolname = wxString( epart->deviceset + epart->device );
symbolname.Replace( wxT( "*" ), wxT( "" ) );
symbolname.Replace( wxT( "*" ), wxEmptyString );
wxString kisymbolname = EscapeString( symbolname, CTX_LIBID );
int unit = m_eagleLibs[libraryname].GateUnit[gatename];
@ -1518,7 +1518,10 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
// Get Device set information
EDEVICE_SET edeviceset = EDEVICE_SET( devicesetNode );
wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : wxT( "" );
wxString prefix;
if( edeviceset.prefix )
prefix = edeviceset.prefix.Get();
NODE_MAP deviceSetChildren = MapChildren( devicesetNode );
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, wxT( "devices" ) );
@ -1531,7 +1534,7 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
// Create symbol name from deviceset and device names.
wxString symbolName = edeviceset.name + edevice.name;
symbolName.Replace( wxT( "*" ), wxT( "" ) );
symbolName.Replace( wxT( "*" ), wxEmptyString );
wxASSERT( !symbolName.IsEmpty() );
symbolName = EscapeString( symbolName, CTX_LIBID );

View File

@ -968,7 +968,7 @@ void SYMBOL_EDIT_FRAME::SyncLibraries( bool aShowProgress, const wxString& aForc
// Try to select the parent library, in case the symbol is not found
if( !found && selected.IsValid() )
{
selected.SetLibItemName( wxT( "" ) );
selected.SetLibItemName( wxEmptyString );
found = m_libMgr->GetAdapter()->FindItem( selected );
if( found )

View File

@ -191,7 +191,7 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
bool res = true; // assume all libraries are successfully saved
PROPERTIES properties;
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxEmptyString );
auto it = m_libs.find( aLibrary );
@ -957,7 +957,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
wxCHECK( libSymbol && originalSymbol, false );
SYMBOL_LIB_TABLE::SAVE_T result;
PROPERTIES properties;
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxEmptyString );
// Delete the original symbol if the symbol name has been changed.
if( libSymbol->GetName() != originalSymbol->GetName() )
@ -1049,7 +1049,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
// set properties to prevent save file on every symbol save
PROPERTIES properties;
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxEmptyString );
// Delete the original symbol if the symbol name has been changed.
if( libSymbol->GetName() != originalSymbol->GetName() )

View File

@ -332,7 +332,7 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
wxString pinName = pin->GetName();
if( pinName.IsEmpty() || pinName == wxT( "~" ) )
pinName = wxT( "" );
pinName = wxEmptyString;
else
pinName = wxT( "'" ) + pinName + wxT( "'" );

View File

@ -1007,7 +1007,7 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
if( !conn )
{
editFrame->SetStatusText( wxT( "" ) );
editFrame->SetStatusText( wxEmptyString );
editFrame->SendCrossProbeClearHighlight();
}
else

View File

@ -259,7 +259,7 @@ const wxString GetPCBDefaultLayerName( int aLayerId )
// Pcbnew knows some other layers, but any other layer is not suitable for export.
default: // Sentinel
txt = wxT( "" ); break;
txt = wxEmptyString; break;
}
return wxString( txt );

View File

@ -807,7 +807,7 @@ protected:
return m_tickLabels.size();
}
virtual const wxString formatLabel( double value, int nDigits ) { return wxT( "" ); }
virtual const wxString formatLabel( double value, int nDigits ) { return wxEmptyString; }
virtual void formatLabels() {};
virtual double getTickPos( int n ) const

View File

@ -429,7 +429,7 @@ bool KICAD_MANAGER_FRAME::CloseProject( bool aSave )
mgr.UnloadProject( &Prj() );
}
SetStatusText( wxT( "" ) );
SetStatusText( wxEmptyString );
m_leftWin->EmptyTreePrj();

View File

@ -101,7 +101,7 @@ void DIALOG_MANAGE_REPOSITORIES::OnAddButtonClicked( wxCommandEvent& event )
}
else
{
WX_PROGRESS_REPORTER reporter( GetParent(), wxT( "" ), 1 );
WX_PROGRESS_REPORTER reporter( GetParent(), wxEmptyString, 1 );
if( m_pcm->FetchRepository( url, repository, &reporter ) )
{

View File

@ -363,7 +363,7 @@ const bool PLUGIN_CONTENT_MANAGER::CacheRepository( const wxString& aRepositoryI
PCM_REPOSITORY current_repo;
std::unique_ptr<WX_PROGRESS_REPORTER> reporter(
new WX_PROGRESS_REPORTER( m_dialog, wxT( "" ), 1 ) );
new WX_PROGRESS_REPORTER( m_dialog, wxEmptyString, 1 ) );
if( !FetchRepository( url, current_repo, reporter.get() ) )
return false;
@ -825,7 +825,7 @@ std::unordered_map<wxString, wxBitmap> PLUGIN_CONTENT_MANAGER::GetInstalledPacka
{
std::unordered_map<wxString, wxBitmap> bitmaps;
wxFileName resources_dir_fn( m_3rdparty_path, wxT( "" ) );
wxFileName resources_dir_fn( m_3rdparty_path, wxEmptyString );
resources_dir_fn.AppendDir( wxT( "resources" ) );
wxDir resources_dir( resources_dir_fn.GetPath() );
@ -833,7 +833,7 @@ std::unordered_map<wxString, wxBitmap> PLUGIN_CONTENT_MANAGER::GetInstalledPacka
return bitmaps;
wxString subdir;
bool more = resources_dir.GetFirst( &subdir, wxT( "" ), wxDIR_DIRS | wxDIR_HIDDEN );
bool more = resources_dir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN );
while( more )
{

View File

@ -349,7 +349,7 @@ wxTreeItemId PROJECT_TREE_PANE::addItemToProjectTree( const wxString& aName,
{
wxString ext = GetFileExt( (TREE_FILE_TYPE) i );
if( ext == wxT( "" ) )
if( ext == wxEmptyString )
continue;
// For gerber files, the official ext is gbr

View File

@ -73,7 +73,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
// First is always the reference designator
m_DefaultFPTextItems.emplace_back( wxT( "REF**" ), true, F_SilkS );
// Second is always the value
m_DefaultFPTextItems.emplace_back( wxT( "" ), true, F_Fab );
m_DefaultFPTextItems.emplace_back( wxEmptyString, true, F_Fab );
// Any following ones are freebies
m_DefaultFPTextItems.emplace_back( wxT( "${REFERENCE}" ), true, F_Fab );

View File

@ -543,7 +543,7 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
change.NewRefDes,
ActionMessage[change.Action],
UpdateRefDes != change.Action ? _( " will be ignored" )
: wxT( "" ) );
: wxString() );
}
ShowReport( message, RPT_SEVERITY_INFO );

View File

@ -707,7 +707,7 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
// We will save data about components in the table.
// We have to calculate column widths
std::vector<int> widths;
std::vector<wxString> labels{ wxT( "" ), _( "Front Side" ), _( "Back Side" ), _( "Total" ) };
std::vector<wxString> labels{ wxEmptyString, _( "Front Side" ), _( "Back Side" ), _( "Total" ) };
wxString tmp;
widths.reserve( labels.size() );

View File

@ -64,7 +64,7 @@ public:
wxString tmpStr;
tmpStr << m_XRef;
m_IDF_Xref->SetValue( tmpStr );
tmpStr = wxT( "" );
tmpStr = wxEmptyString;
tmpStr << m_YRef;
m_IDF_Yref->SetValue( tmpStr );

View File

@ -80,7 +80,7 @@ public:
wxString tmpStr;
tmpStr << m_XRef;
m_VRML_Xref->SetValue( tmpStr );
tmpStr = wxT( "" );
tmpStr = wxEmptyString;
tmpStr << m_YRef;
m_VRML_Yref->SetValue( tmpStr );
m_sdbSizerOK->SetDefault();

View File

@ -206,7 +206,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
attr->SetReadOnly(); \
m_grid->SetAttr( aRow, aCol, attr ); \
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxEmptyString )
const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
wxGridCellAttr* attr;

View File

@ -320,7 +320,7 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
#elif defined( __WINDOWS__ )
// On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
// drawing routines so strip the \r char.
txt.Replace( wxT( "\r" ), wxT( "" ) );
txt.Replace( wxT( "\r" ), wxEmptyString );
#endif
m_edaText->SetText( EscapeString( txt, CTX_QUOTED_STR ) );
}

View File

@ -115,7 +115,7 @@ public:
bool AppendRows( size_t aNumRows = 1 ) override
{
for( size_t i = 0; i < aNumRows; ++i )
m_items.emplace_back( wxT( "" ), true, F_SilkS );
m_items.emplace_back( wxEmptyString, true, F_SilkS );
if( GetView() )
{
@ -241,7 +241,7 @@ bool PANEL_FP_EDITOR_DEFAULTS::TransferDataToWindow()
SET_MILS_CELL( i, COL_TEXT_WIDTH, m_brdSettings.m_TextSize[ i ].x );
SET_MILS_CELL( i, COL_TEXT_HEIGHT, m_brdSettings.m_TextSize[ i ].y );
SET_MILS_CELL( i, COL_TEXT_THICKNESS, m_brdSettings.m_TextThickness[ i ] );
m_graphicsGrid->SetCellValue( i, COL_TEXT_ITALIC, m_brdSettings.m_TextItalic[ i ] ? wxT( "1" ) : wxT( "" ) );
m_graphicsGrid->SetCellValue( i, COL_TEXT_ITALIC, m_brdSettings.m_TextItalic[ i ] ? wxT( "1" ) : wxEmptyString );
auto attr = new wxGridCellAttr;
attr->SetRenderer( new wxGridCellBoolRenderer() );

View File

@ -107,25 +107,25 @@ static const std::map<int, SUPPORTED_FILE_TYPE>& fileTypes()
{
{ ID_PANEL_FPLIB_ADD_KICADMOD,
{
wxT( "KiCad (folder with .kicad_mod files)" ), wxT( "" ),
wxT( "KiCad (folder with .kicad_mod files)" ), wxEmptyString,
KiCadFootprintFileExtension, false, IO_MGR::KICAD_SEXP
}
},
{ ID_PANEL_FPLIB_ADD_EAGLE6,
{
wxT( "Eagle 6.x (*.lbr)" ), EagleFootprintLibPathWildcard(), wxT( "" ),
wxT( "Eagle 6.x (*.lbr)" ), EagleFootprintLibPathWildcard(), wxEmptyString,
true, IO_MGR::EAGLE
}
},
{ ID_PANEL_FPLIB_ADD_KICADLEGACY,
{
wxT( "KiCad legacy (*.mod)" ), LegacyFootprintLibPathWildcard(), wxT( "" ),
wxT( "KiCad legacy (*.mod)" ), LegacyFootprintLibPathWildcard(), wxEmptyString,
true, IO_MGR::LEGACY
}
},
{ ID_PANEL_FPLIB_ADD_GEDA,
{
wxT( "Geda (folder with *.fp files)" ), wxT( "" ),
wxT( "Geda (folder with *.fp files)" ), wxEmptyString,
GedaPcbFootprintLibFileExtension, false, IO_MGR::GEDA_PCB
}
},

View File

@ -216,9 +216,9 @@ void PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged( wxGridEvent& aEvent )
// Perform cleanup and validation on the filename if it isn't empty
if( !filename.empty() )
{
filename.Replace( wxT( "\n" ), wxT( "" ) );
filename.Replace( wxT( "\r" ), wxT( "" ) );
filename.Replace( wxT( "\t" ), wxT( "" ) );
filename.Replace( wxT( "\n" ), wxEmptyString );
filename.Replace( wxT( "\r" ), wxEmptyString );
filename.Replace( wxT( "\t" ), wxEmptyString );
res->ValidateFileName( filename, hasAlias );

View File

@ -148,8 +148,8 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
SET_MILS_CELL( i, COL_TEXT_WIDTH, m_BrdSettings->m_TextSize[ i ].x );
SET_MILS_CELL( i, COL_TEXT_HEIGHT, m_BrdSettings->m_TextSize[ i ].y );
SET_MILS_CELL( i, COL_TEXT_THICKNESS, m_BrdSettings->m_TextThickness[ i ] );
m_grid->SetCellValue( i, COL_TEXT_ITALIC, m_BrdSettings->m_TextItalic[ i ] ? wxT( "1" ) : wxT( "" ) );
m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, m_BrdSettings->m_TextUpright[ i ] ? wxT( "1" ) : wxT( "" ) );
m_grid->SetCellValue( i, COL_TEXT_ITALIC, m_BrdSettings->m_TextItalic[ i ] ? wxT( "1" ) : wxEmptyString );
m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, m_BrdSettings->m_TextUpright[ i ] ? wxT( "1" ) : wxEmptyString );
auto attr = new wxGridCellAttr;
attr->SetRenderer( new wxGridCellBoolRenderer() );

View File

@ -792,7 +792,7 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
auto sM = aFootprint->Models().begin();
auto eM = aFootprint->Models().end();
wxFileName subdir( m_Subdir3DFpModels, wxT( "" ) );
wxFileName subdir( m_Subdir3DFpModels, wxEmptyString );
while( sM != eM )
{
@ -926,8 +926,8 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream
if( m_UseRelPathIn3DModelFilename )
{
wxFileName tmp = dstFile;
tmp.SetExt( wxT( "" ) );
tmp.SetName( wxT( "" ) );
tmp.SetExt( wxEmptyString );
tmp.SetName( wxEmptyString );
tmp.RemoveLastDir();
dstFile.MakeRelativeTo( tmp.GetPath() );
}
@ -1049,7 +1049,7 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt
void EXPORTER_PCB_VRML::ExportFp3DModelsAsLinkedFile( const wxString& aFullFileName )
{
// check if the 3D Subdir exists - create if not
wxFileName subdir( m_Subdir3DFpModels, wxT( "" ) );
wxFileName subdir( m_Subdir3DFpModels, wxEmptyString );
if( ! subdir.DirExists() )
{

View File

@ -220,7 +220,7 @@ public:
* The import function can also read gpcb footprint file, in Newlib format.
* (One footprint per file, Newlib files have no special ext.)
*/
FOOTPRINT* ImportFootprint( const wxString& aName = wxT( "" ) );
FOOTPRINT* ImportFootprint( const wxString& aName = wxEmptyString );
/**
* Load a footprint from the main board into the Footprint Editor.

View File

@ -128,7 +128,7 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
if( entry.empty() || !entry.is_array() )
continue;
TEXT_ITEM_INFO textInfo( wxT( "" ), true, F_SilkS );
TEXT_ITEM_INFO textInfo( wxEmptyString, true, F_SilkS );
textInfo.m_Text = entry.at(0).get<wxString>();
textInfo.m_Visible = entry.at(1).get<bool>();

View File

@ -440,7 +440,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList()
m_parameterGrid->SetCellEditor( i, WIZ_COL_VALUE,
new wxGridCellChoiceEditor( options ) );
units = wxT( "" );
units = wxEmptyString;
}
else if( units == WIZARD_PARAM_UNITS_INTEGER ) // Integer parameters
{

View File

@ -1027,8 +1027,8 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
}
// Update the ratsnest
m_reporter->ReportTail( wxT( "" ), RPT_SEVERITY_ACTION );
m_reporter->ReportTail( wxT( "" ), RPT_SEVERITY_ACTION );
m_reporter->ReportTail( wxEmptyString, RPT_SEVERITY_ACTION );
m_reporter->ReportTail( wxEmptyString, RPT_SEVERITY_ACTION );
msg.Printf( _( "Total warnings: %d, errors: %d." ), m_warningCount, m_errorCount );
m_reporter->ReportTail( msg, RPT_SEVERITY_INFO );

View File

@ -192,7 +192,7 @@ ABOARD6::ABOARD6( ALTIUM_PARSER& aReader )
ABOARD6_LAYER_STACKUP l;
l.name = ALTIUM_PARSER::ReadString( props, layername, wxT( "" ) );
l.name = ALTIUM_PARSER::ReadString( props, layername, wxEmptyString );
l.nextId = ALTIUM_PARSER::ReadInt( props, layeri + wxT( "NEXT" ), 0 );
l.prevId = ALTIUM_PARSER::ReadInt( props, layeri + wxT( "PREV" ), 0 );
l.copperthick = ALTIUM_PARSER::ReadKicadUnit( props, layeri + wxT( "COPTHICK" ), wxT( "1.4mil" ) );
@ -217,8 +217,8 @@ ACLASS6::ACLASS6( ALTIUM_PARSER& aReader )
if( properties.empty() )
THROW_IO_ERROR( wxT( "Classes6 stream has no properties!" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
uniqueid = ALTIUM_PARSER::ReadString( properties, wxT( "UNIQUEID" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxEmptyString );
uniqueid = ALTIUM_PARSER::ReadString( properties, wxT( "UNIQUEID" ), wxEmptyString );
kind = static_cast<ALTIUM_CLASS_KIND>( ALTIUM_PARSER::ReadInt( properties, wxT( "KIND" ), -1 ) );
for( size_t i = 0; i < std::numeric_limits<size_t>::max(); i++ )
@ -242,19 +242,19 @@ ACOMPONENT6::ACOMPONENT6( ALTIUM_PARSER& aReader )
if( props.empty() )
THROW_IO_ERROR( wxT( "Components6 stream has no props" ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxT( "" ) ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxEmptyString ) );
position = wxPoint( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "X" ), wxT( "0mil" ) ),
-ALTIUM_PARSER::ReadKicadUnit( props, wxT( "Y" ), wxT( "0mil" ) ) );
rotation = ALTIUM_PARSER::ReadDouble( props, wxT( "ROTATION" ), 0. );
locked = ALTIUM_PARSER::ReadBool( props, wxT( "LOCKED" ), false );
nameon = ALTIUM_PARSER::ReadBool( props, wxT( "NAMEON" ), true );
commenton = ALTIUM_PARSER::ReadBool( props, wxT( "COMMENTON" ), false );
sourcedesignator = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEDESIGNATOR" ), wxT( "" ) );
sourcefootprintlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEFOOTPRINTLIBRARY" ), wxT( "" ) );
pattern = ALTIUM_PARSER::ReadString( props, wxT( "PATTERN" ), wxT( "" ) );
sourcedesignator = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEDESIGNATOR" ), wxEmptyString );
sourcefootprintlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCEFOOTPRINTLIBRARY" ), wxEmptyString );
pattern = ALTIUM_PARSER::ReadString( props, wxT( "PATTERN" ), wxEmptyString );
sourcecomponentlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCECOMPONENTLIBRARY" ), wxT( "" ) );
sourcelibreference = ALTIUM_PARSER::ReadString( props, wxT( "SOURCELIBREFERENCE" ), wxT( "" ) );
sourcecomponentlibrary = ALTIUM_PARSER::ReadString( props, wxT( "SOURCECOMPONENTLIBRARY" ), wxEmptyString );
sourcelibreference = ALTIUM_PARSER::ReadString( props, wxT( "SOURCELIBREFERENCE" ), wxEmptyString );
nameautoposition = static_cast<ALTIUM_TEXT_POSITION>(
ALTIUM_PARSER::ReadInt( props, wxT( "NAMEAUTOPOSITION" ), 0 ) );
@ -274,12 +274,12 @@ ADIMENSION6::ADIMENSION6( ALTIUM_PARSER& aReader )
if( props.empty() )
THROW_IO_ERROR( wxT( "Dimensions6 stream has no props" ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxT( "" ) ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, wxT( "LAYER" ), wxEmptyString ) );
kind = static_cast<ALTIUM_DIMENSION_KIND>( ALTIUM_PARSER::ReadInt( props, wxT( "DIMENSIONKIND" ), 0 ) );
textformat = ALTIUM_PARSER::ReadString( props, wxT( "TEXTFORMAT" ), wxT( "" ) );
textprefix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPREFIX" ), wxT( "" ) );
textsuffix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTSUFFIX" ), wxT( "" ) );
textformat = ALTIUM_PARSER::ReadString( props, wxT( "TEXTFORMAT" ), wxEmptyString );
textprefix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPREFIX" ), wxEmptyString );
textsuffix = ALTIUM_PARSER::ReadString( props, wxT( "TEXTSUFFIX" ), wxEmptyString );
height = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "HEIGHT" ), wxT( "0mil" ) );
angle = ALTIUM_PARSER::ReadDouble( props, wxT( "ANGLE" ), 0. );
@ -294,7 +294,7 @@ ADIMENSION6::ADIMENSION6( ALTIUM_PARSER& aReader )
arrowsize = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "ARROWSIZE" ), wxT( "60mil" ) );
wxString text_position_raw = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPOSITION" ), wxT( "" ) );
wxString text_position_raw = ALTIUM_PARSER::ReadString( props, wxT( "TEXTPOSITION" ), wxEmptyString );
xy1 = wxPoint( ALTIUM_PARSER::ReadKicadUnit( props, wxT( "X1" ), wxT( "0mil" ) ),
-ALTIUM_PARSER::ReadKicadUnit( props, wxT( "Y1" ), wxT( "0mil" ) ) );
@ -340,8 +340,8 @@ AMODEL::AMODEL( ALTIUM_PARSER& aReader )
if( properties.empty() )
THROW_IO_ERROR( wxT( "Classes6 stream has no properties!" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
id = ALTIUM_PARSER::ReadString( properties, wxT( "ID" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxEmptyString );
id = ALTIUM_PARSER::ReadString( properties, wxT( "ID" ), wxEmptyString );
isEmbedded = ALTIUM_PARSER::ReadBool( properties, wxT( "EMBED" ), false );
rotation.x = ALTIUM_PARSER::ReadDouble( properties, wxT( "ROTX" ), 0. );
@ -359,7 +359,7 @@ ANET6::ANET6( ALTIUM_PARSER& aReader )
if( properties.empty() )
THROW_IO_ERROR( wxT( "Nets6 stream has no properties" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( properties, wxT( "NAME" ), wxEmptyString );
if( aReader.HasParsingError() )
THROW_IO_ERROR( wxT( "Nets6 stream was not parsed correctly" ) );
@ -372,7 +372,7 @@ APOLYGON6::APOLYGON6( ALTIUM_PARSER& aReader )
if( properties.empty() )
THROW_IO_ERROR( wxT( "Polygons6 stream has no properties" ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( properties, wxT( "LAYER" ), wxT( "" ) ) );
layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( properties, wxT( "LAYER" ), wxEmptyString ) );
net = ALTIUM_PARSER::ReadInt( properties, wxT( "NET" ), ALTIUM_NET_UNCONNECTED );
locked = ALTIUM_PARSER::ReadBool( properties, wxT( "LOCKED" ), false );
@ -385,7 +385,7 @@ APOLYGON6::APOLYGON6( ALTIUM_PARSER& aReader )
pourindex = ALTIUM_PARSER::ReadInt( properties, wxT( "POURINDEX" ), 0 );
wxString hatchstyleraw = ALTIUM_PARSER::ReadString( properties, wxT( "HATCHSTYLE" ), wxT( "" ) );
wxString hatchstyleraw = ALTIUM_PARSER::ReadString( properties, wxT( "HATCHSTYLE" ), wxEmptyString );
if( hatchstyleraw == wxT( "Solid" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::SOLID;
else if( hatchstyleraw == wxT( "45Degree" ) ) hatchstyle = ALTIUM_POLYGON_HATCHSTYLE::DEGREE_45;
@ -418,13 +418,13 @@ ARULE6::ARULE6( ALTIUM_PARSER& aReader )
if( props.empty() )
THROW_IO_ERROR( wxT( "Rules6 stream has no props" ) );
name = ALTIUM_PARSER::ReadString( props, wxT( "NAME" ), wxT( "" ) );
name = ALTIUM_PARSER::ReadString( props, wxT( "NAME" ), wxEmptyString );
priority = ALTIUM_PARSER::ReadInt( props, wxT( "PRIORITY" ), 1 );
scope1expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE1EXPRESSION" ), wxT( "" ) );
scope2expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE2EXPRESSION" ), wxT( "" ) );
scope1expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE1EXPRESSION" ), wxEmptyString );
scope2expr = ALTIUM_PARSER::ReadString( props, wxT( "SCOPE2EXPRESSION" ), wxEmptyString );
wxString rulekind = ALTIUM_PARSER::ReadString( props, wxT( "RULEKIND" ), wxT( "" ) );
wxString rulekind = ALTIUM_PARSER::ReadString( props, wxT( "RULEKIND" ), wxEmptyString );
if( rulekind == wxT( "Clearance" ) )
{
kind = ALTIUM_RULE_KIND::CLEARANCE;
@ -466,7 +466,7 @@ ARULE6::ARULE6( ALTIUM_PARSER& aReader )
polygonconnectReliefconductorwidth = ALTIUM_PARSER::ReadKicadUnit( props, wxT( "RELIEFCONDUCTORWIDTH" ), wxT( "10mil" ) );
polygonconnectReliefentries = ALTIUM_PARSER::ReadInt( props, wxT( "RELIEFENTRIES" ), 4 );
wxString style = ALTIUM_PARSER::ReadString( props, wxT( "CONNECTSTYLE" ), wxT( "" ) );
wxString style = ALTIUM_PARSER::ReadString( props, wxT( "CONNECTSTYLE" ), wxEmptyString );
if( style == wxT( "Direct" ) ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::DIRECT;
else if( style == wxT( "Relief" ) ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::RELIEF;
@ -538,8 +538,8 @@ ACOMPONENTBODY6::ACOMPONENTBODY6( ALTIUM_PARSER& aReader )
if( properties.empty() )
THROW_IO_ERROR( wxT( "ComponentsBodies6 stream has no properties" ) );
modelName = ALTIUM_PARSER::ReadString( properties, wxT( "MODEL.NAME" ), wxT( "" ) );
modelId = ALTIUM_PARSER::ReadString( properties, wxT( "MODELID" ), wxT( "" ) );
modelName = ALTIUM_PARSER::ReadString( properties, wxT( "MODEL.NAME" ), wxEmptyString );
modelId = ALTIUM_PARSER::ReadString( properties, wxT( "MODELID" ), wxEmptyString );
modelIsEmbedded = ALTIUM_PARSER::ReadBool( properties, wxT( "MODEL.EMBED" ), false );
modelPosition.x = ALTIUM_PARSER::ReadKicadUnit( properties, wxT( "MODEL.2D.X" ), wxT( "0mil" ) );

View File

@ -714,7 +714,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponentLibrary()
SYMDEF_PCB component = symPair.second;
wxString fpName = component.ReferenceName + ( ( component.Alternate.size() > 0 ) ?
( wxT( " (" ) + component.Alternate + wxT( ")" ) ) :
wxT( "" ) );
wxString() );
// Check that we are not loading a documentation symbol.
// Documentation symbols in CADSTAR are graphical "footprints" that can be assigned
@ -999,7 +999,7 @@ PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad,
// PCB Only pads in CADSTAR do not have a representation in the schematic - they are
// purely mechanical pads that have no net associated with them. Make the pad name
// empty to avoid warnings when importing from the schematic
pad->SetNumber( wxT( "" ) );
pad->SetNumber( wxEmptyString );
}
else
{

View File

@ -86,7 +86,7 @@ PCB::PCB( BOARD* aBoard ) :
TLAYER layer;
layer.KiCadLayer = F_Mask; // default
layer.layerType = LAYER_TYPE_NONSIGNAL; // default
layer.netNameRef = wxT( "" ); // default
layer.netNameRef = wxEmptyString; // default
m_LayersMap.insert( std::make_pair( i, layer ) );
}

View File

@ -75,7 +75,7 @@ void PCB_TEXT::Parse( XNODE* aNode, int aLayer, const wxString& aDefaultUnits,
}
aNode->GetAttribute( wxT( "Name" ), &m_name.text );
m_name.text.Replace( wxT( "\r" ), wxT( "" ) );
m_name.text.Replace( wxT( "\r" ), wxEmptyString );
str = FindNodeGetContent( aNode, wxT( "justify" ) );
m_name.justify = GetJustifyIdentificator( str );

View File

@ -110,7 +110,7 @@ BOOST_AUTO_TEST_CASE( SetVar )
*/
static const std::vector<EVAL_CASE> eval_cases_valid = {
// Empty case
{ wxT( "" ), wxT( "0" ) },
{ wxEmptyString, wxT( "0" ) },
// Trivial eval
{ wxT( "1" ), wxT( "1" ) },
// Decimal separators

View File

@ -293,11 +293,11 @@ PNS_LOG_VIEWER_FRAME::PNS_LOG_VIEWER_FRAME( wxFrame* frame ) : PNS_LOG_VIEWER_FR
settings->SetZoneDisplayMode( ZONE_DISPLAY_MODE::SHOW_FILLED );
m_listPopupMenu = new wxMenu( wxT( "" ) );
m_listPopupMenu->Append( ID_LIST_COPY, wxT( "Copy selected geometry" ), wxT( "" ),
m_listPopupMenu = new wxMenu( wxEmptyString );
m_listPopupMenu->Append( ID_LIST_COPY, wxT( "Copy selected geometry" ), wxEmptyString,
wxITEM_NORMAL );
m_listPopupMenu->Append( ID_LIST_SHOW_ALL, wxT( "Show all" ), wxT( "" ), wxITEM_NORMAL );
m_listPopupMenu->Append( ID_LIST_SHOW_NONE, wxT( "Show none" ), wxT( "" ), wxITEM_NORMAL );
m_listPopupMenu->Append( ID_LIST_SHOW_ALL, wxT( "Show all" ), wxEmptyString, wxITEM_NORMAL );
m_listPopupMenu->Append( ID_LIST_SHOW_NONE, wxT( "Show none" ), wxEmptyString, wxITEM_NORMAL );
m_itemList->Connect( m_itemList->GetId(), wxEVT_TREELIST_ITEM_CONTEXT_MENU,
wxMouseEventHandler( PNS_LOG_VIEWER_FRAME::onListRightClick ), nullptr,

View File

@ -187,7 +187,7 @@ wxString S3D_RESOLVER::ResolvePath( const wxString& aFileName,
// users can potentially override a model within ${KICAD6_3DMODEL_DIR}.
if( !m_Paths.empty() && !m_Paths.begin()->m_Pathexp.empty() && !tname.StartsWith( wxT( ":" ) ) )
{
tmpFN.Assign( m_Paths.begin()->m_Pathexp, wxT( "" ) );
tmpFN.Assign( m_Paths.begin()->m_Pathexp, wxEmptyString );
wxString fullPath = tmpFN.GetPathWithSep() + tname;
if( fullPath.StartsWith( wxT( "${" ) ) || fullPath.StartsWith( wxT( "$(" ) ) )
@ -295,7 +295,7 @@ bool S3D_RESOLVER::addPath( const SEARCH_PATH& aPath )
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
#endif
wxFileName path( tpath.m_Pathvar, wxT( "" ) );
wxFileName path( tpath.m_Pathvar, wxEmptyString );
path.Normalize();
if( !path.DirExists() )
@ -485,7 +485,7 @@ void S3D_RESOLVER::checkEnvVarPath( const wxString& aPath )
SEARCH_PATH lpath;
lpath.m_Alias = envar;
lpath.m_Pathvar = lpath.m_Alias;
wxFileName tmpFN( lpath.m_Alias, wxT( "" ) );
wxFileName tmpFN( lpath.m_Alias, wxEmptyString );
wxUniChar psep = tmpFN.GetPathSeparator();
tmpFN.Normalize();
@ -560,7 +560,7 @@ wxString S3D_RESOLVER::ShortenPath( const wxString& aFullPathName )
continue;
}
wxFileName fpath( sL->m_Pathexp, wxT( "" ) );
wxFileName fpath( sL->m_Pathexp, wxEmptyString );
wxString fps = fpath.GetPathWithSep();
wxString tname;

View File

@ -42,7 +42,7 @@
KICADPCB::KICADPCB( const wxString& aPcbName )
{
m_resolver.Set3DConfigDir( wxT( "" ) );
m_resolver.Set3DConfigDir( wxEmptyString );
m_thickness = 1.6;
m_pcb_model = nullptr;
m_minDistance = MIN_DISTANCE;