Fix a few compil warnings
This commit is contained in:
parent
4bfbf91369
commit
4915f6ca20
|
@ -31,7 +31,6 @@
|
||||||
#include <locale_io.h>
|
#include <locale_io.h>
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
|
|
||||||
using TYPE = SIM_VALUE::TYPE;
|
|
||||||
using CATEGORY = SIM_MODEL::PARAM::CATEGORY;
|
using CATEGORY = SIM_MODEL::PARAM::CATEGORY;
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +50,6 @@ DIALOG_SIM_MODEL<T>::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol,
|
||||||
m_wasCodePreviewUpdated( true )
|
m_wasCodePreviewUpdated( true )
|
||||||
{
|
{
|
||||||
m_modelNameCombobox->SetValidator( m_modelNameValidator );
|
m_modelNameCombobox->SetValidator( m_modelNameValidator );
|
||||||
auto validator = dynamic_cast<MODEL_NAME_VALIDATOR*>( m_modelNameCombobox->GetValidator() );
|
|
||||||
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
for( SIM_MODEL::TYPE type : SIM_MODEL::TYPE_ITERATOR() )
|
for( SIM_MODEL::TYPE type : SIM_MODEL::TYPE_ITERATOR() )
|
||||||
|
@ -59,7 +57,7 @@ DIALOG_SIM_MODEL<T>::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol,
|
||||||
m_models.push_back( SIM_MODEL::Create( type, m_symbol.GetAllPins().size() ) );
|
m_models.push_back( SIM_MODEL::Create( type, m_symbol.GetAllPins().size() ) );
|
||||||
|
|
||||||
SIM_MODEL::DEVICE_TYPE_ deviceType = SIM_MODEL::TypeInfo( type ).deviceType;
|
SIM_MODEL::DEVICE_TYPE_ deviceType = SIM_MODEL::TypeInfo( type ).deviceType;
|
||||||
|
|
||||||
if( !m_curModelTypeOfDeviceType.count( deviceType ) )
|
if( !m_curModelTypeOfDeviceType.count( deviceType ) )
|
||||||
m_curModelTypeOfDeviceType[deviceType] = type;
|
m_curModelTypeOfDeviceType[deviceType] = type;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +68,6 @@ DIALOG_SIM_MODEL<T>::DIALOG_SIM_MODEL( wxWindow* aParent, SCH_SYMBOL& aSymbol,
|
||||||
for( SIM_MODEL::DEVICE_TYPE_ deviceType : SIM_MODEL::DEVICE_TYPE__ITERATOR() )
|
for( SIM_MODEL::DEVICE_TYPE_ deviceType : SIM_MODEL::DEVICE_TYPE__ITERATOR() )
|
||||||
m_deviceTypeChoice->Append( SIM_MODEL::DeviceTypeInfo( deviceType ).description );
|
m_deviceTypeChoice->Append( SIM_MODEL::DeviceTypeInfo( deviceType ).description );
|
||||||
|
|
||||||
|
|
||||||
m_scintillaTricks = std::make_unique<SCINTILLA_TRICKS>( m_codePreview, wxT( "{}" ), false );
|
m_scintillaTricks = std::make_unique<SCINTILLA_TRICKS>( m_codePreview, wxT( "{}" ), false );
|
||||||
|
|
||||||
m_paramGridMgr->Bind( wxEVT_PG_SELECTED, &DIALOG_SIM_MODEL::onParamGridSelectionChange, this );
|
m_paramGridMgr->Bind( wxEVT_PG_SELECTED, &DIALOG_SIM_MODEL::onParamGridSelectionChange, this );
|
||||||
|
@ -353,7 +350,7 @@ void DIALOG_SIM_MODEL<T>::updatePinAssignmentsTab()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wxString modelPinString = getModelPinString( i + 1 );
|
wxString modelPinString = getModelPinString( i + 1 );
|
||||||
wxArrayString choices;
|
wxArrayString choices;
|
||||||
|
|
||||||
m_pinAssignmentsGrid->SetCellValue( static_cast<int>( symbolPinNumber - 1 ),
|
m_pinAssignmentsGrid->SetCellValue( static_cast<int>( symbolPinNumber - 1 ),
|
||||||
static_cast<int>( PIN_COLUMN::MODEL ),
|
static_cast<int>( PIN_COLUMN::MODEL ),
|
||||||
|
@ -979,7 +976,7 @@ void DIALOG_SIM_MODEL<T>::onParamGridSelectionChange( wxPropertyGridEvent& aEven
|
||||||
m_prevParamGridSelection = grid->GetSelection();
|
m_prevParamGridSelection = grid->GetSelection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Without this the user had to press tab before they could edit the field.
|
// Without this the user had to press tab before they could edit the field.
|
||||||
editorControl->SetFocus();
|
editorControl->SetFocus();
|
||||||
m_prevParamGridSelection = grid->GetSelection();
|
m_prevParamGridSelection = grid->GetSelection();
|
||||||
|
|
|
@ -79,7 +79,7 @@ public:
|
||||||
m_exclude( exclude )
|
m_exclude( exclude )
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual wxDirTraverseResult OnFile( const wxString& filename )
|
virtual wxDirTraverseResult OnFile( const wxString& filename ) override
|
||||||
{
|
{
|
||||||
if( !filename.StartsWith( m_exclude ) )
|
if( !filename.StartsWith( m_exclude ) )
|
||||||
m_files.emplace_back( wxFileName( filename ) );
|
m_files.emplace_back( wxFileName( filename ) );
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
return wxDIR_CONTINUE;
|
return wxDIR_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual wxDirTraverseResult OnDir( const wxString& dirname )
|
virtual wxDirTraverseResult OnDir( const wxString& dirname ) override
|
||||||
{
|
{
|
||||||
if( !dirname.StartsWith( m_exclude ) )
|
if( !dirname.StartsWith( m_exclude ) )
|
||||||
m_files.emplace_back( wxFileName::DirName( dirname ) );
|
m_files.emplace_back( wxFileName::DirName( dirname ) );
|
||||||
|
|
Loading…
Reference in New Issue