Reduce compiler warnings.
This commit is contained in:
parent
3581a9773f
commit
56aae7a147
|
@ -575,7 +575,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||||
* At this point the rectangle origin is the text origin (m_Pos). This is correct only for
|
* At this point the rectangle origin is the text origin (m_Pos). This is correct only for
|
||||||
* left and top justified, non-mirrored, non-overbarred texts. Recalculate for all others.
|
* left and top justified, non-mirrored, non-overbarred texts. Recalculate for all others.
|
||||||
*/
|
*/
|
||||||
int italicOffset = IsItalic() ? fontSize.y * ITALIC_TILT : 0;
|
int italicOffset = IsItalic() ? KiROUND( fontSize.y * ITALIC_TILT ) : 0;
|
||||||
|
|
||||||
switch( GetHorizJustify() )
|
switch( GetHorizJustify() )
|
||||||
{
|
{
|
||||||
|
@ -656,7 +656,7 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
|
||||||
|
|
||||||
positions.reserve( strings.Count() );
|
positions.reserve( strings.Count() );
|
||||||
|
|
||||||
GetLinePositions( positions, strings.Count() );
|
GetLinePositions( positions, (int) strings.Count() );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < strings.Count(); ii++ )
|
for( unsigned ii = 0; ii < strings.Count(); ii++ )
|
||||||
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, strings[ii], positions[ii] );
|
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, strings[ii], positions[ii] );
|
||||||
|
@ -987,7 +987,7 @@ bool EDA_TEXT::ValidateHyperlink( const wxString& aURL )
|
||||||
|
|
||||||
if( uri.Create( aURL ) && uri.HasScheme() )
|
if( uri.Create( aURL ) && uri.HasScheme() )
|
||||||
{
|
{
|
||||||
wxString scheme = uri.GetScheme();
|
const wxString& scheme = uri.GetScheme();
|
||||||
return scheme == wxT( "file" ) || scheme == wxT( "http" ) || scheme == wxT( "https" );
|
return scheme == wxT( "file" ) || scheme == wxT( "http" ) || scheme == wxT( "https" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,12 +197,12 @@ bool NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries( unsigned aNetlistOptions
|
||||||
|
|
||||||
thisFile.SetPath( dirName ); // Set the base path to the cache folder
|
thisFile.SetPath( dirName ); // Set the base path to the cache folder
|
||||||
|
|
||||||
int numFilesFound = dir.GetAllFiles( dirName, &fileList, fileSpec );
|
size_t numFilesFound = wxDir::GetAllFiles( dirName, &fileList, fileSpec );
|
||||||
|
|
||||||
for( int i = 0; i < numFilesFound; i++ )
|
for( size_t ii = 0; ii < numFilesFound; ii++ )
|
||||||
{
|
{
|
||||||
// Completes path to specific file so we can get its "last access" date
|
// Completes path to specific file so we can get its "last access" date
|
||||||
thisFile.SetFullName( fileList[i] );
|
thisFile.SetFullName( fileList[ii] );
|
||||||
wxRemoveFile( thisFile.GetFullPath() );
|
wxRemoveFile( thisFile.GetFullPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,11 +257,8 @@ bool NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries( unsigned aNetlistOptions
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( !readRefName( sheet, *symbol, spiceItem, refNames ) )
|
readRefName( sheet, *symbol, spiceItem, refNames );
|
||||||
return false;
|
|
||||||
|
|
||||||
readModel( sheet, *symbol, spiceItem );
|
readModel( sheet, *symbol, spiceItem );
|
||||||
|
|
||||||
readPinNumbers( *symbol, spiceItem );
|
readPinNumbers( *symbol, spiceItem );
|
||||||
readPinNetNames( *symbol, spiceItem, ncCounter );
|
readPinNetNames( *symbol, spiceItem, ncCounter );
|
||||||
|
|
||||||
|
@ -387,7 +384,7 @@ void NETLIST_EXPORTER_SPICE::ReadDirectives( unsigned aNetlistOptions, REPORTER&
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool NETLIST_EXPORTER_SPICE::readRefName( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol,
|
void NETLIST_EXPORTER_SPICE::readRefName( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol,
|
||||||
SPICE_ITEM& aItem,
|
SPICE_ITEM& aItem,
|
||||||
std::set<std::string>& aRefNames )
|
std::set<std::string>& aRefNames )
|
||||||
{
|
{
|
||||||
|
@ -395,8 +392,6 @@ bool NETLIST_EXPORTER_SPICE::readRefName( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aS
|
||||||
|
|
||||||
if( !aRefNames.insert( aItem.refName ).second )
|
if( !aRefNames.insert( aItem.refName ).second )
|
||||||
wxASSERT( wxT( "Duplicate refdes encountered; what happened to ReadyToNetlist()?" ) );
|
wxASSERT( wxT( "Duplicate refdes encountered; what happened to ReadyToNetlist()?" ) );
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -483,9 +478,8 @@ void NETLIST_EXPORTER_SPICE::writeInclude( OUTPUTFORMATTER& aFormatter, unsigned
|
||||||
|
|
||||||
if( fullPath.IsEmpty() )
|
if( fullPath.IsEmpty() )
|
||||||
{
|
{
|
||||||
DisplayErrorMessage( nullptr,
|
DisplayErrorMessage( nullptr, wxString::Format( _( "Could not find library file '%s'" ),
|
||||||
wxString::Format( _( "Could not find library file '%s'" ),
|
expandedPath ) );
|
||||||
expandedPath ) );
|
|
||||||
fullPath = expandedPath;
|
fullPath = expandedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ protected:
|
||||||
SCH_SHEET_LIST GetSheets( unsigned aNetlistOptions = 0 ) const;
|
SCH_SHEET_LIST GetSheets( unsigned aNetlistOptions = 0 ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool readRefName( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem,
|
void readRefName( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem,
|
||||||
std::set<std::string>& aRefNames );
|
std::set<std::string>& aRefNames );
|
||||||
void readModel( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem );
|
void readModel( SCH_SHEET_PATH& aSheet, SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem );
|
||||||
void readPinNumbers( SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem );
|
void readPinNumbers( SCH_SYMBOL& aSymbol, SPICE_ITEM& aItem );
|
||||||
|
|
|
@ -1666,10 +1666,15 @@ bool SIM_PLOT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
|
||||||
filename.SetFullName( Prj().GetProjectName() + wxT( ".wbk" ) );
|
filename.SetFullName( Prj().GetProjectName() + wxT( ".wbk" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 // TODO: Enable once 8.0 opens for dev
|
||||||
|
wxString msg = _( "Save changes to workbook?" );
|
||||||
|
#else
|
||||||
wxString fullFilename = filename.GetFullName();
|
wxString fullFilename = filename.GetFullName();
|
||||||
wxString msg = _( "Save changes to '%s' before closing?" );
|
wxString msg = _( "Save changes to '%s' before closing?" );
|
||||||
|
msg.Printf( msg, fullFilename );
|
||||||
|
#endif
|
||||||
|
|
||||||
return HandleUnsavedChanges( this, wxString::Format( msg, fullFilename ),
|
return HandleUnsavedChanges( this, msg,
|
||||||
[&]() -> bool
|
[&]() -> bool
|
||||||
{
|
{
|
||||||
return saveWorkbook( Prj().AbsolutePath( fullFilename ) );
|
return saveWorkbook( Prj().AbsolutePath( fullFilename ) );
|
||||||
|
|
Loading…
Reference in New Issue