Clear some compile warnings

This commit is contained in:
Seth Hillbrand 2019-06-12 22:16:54 -07:00
parent 8cc1e2b5e7
commit fb3d1bdb59
3 changed files with 5 additions and 4 deletions

View File

@ -804,9 +804,11 @@ bool DIALOG_SPICE_MODEL::addPwlValue( const wxString& aTime, const wxString& aVa
float timeF;
m_pwlTime->GetValue().ToDouble( &timeD );
timeF = timeD;
long data;
std::memcpy( &data, &timeF, sizeof( timeF ) );
// Store the time value, so the entries can be sorted
m_pwlValList->SetItemData( idx, *reinterpret_cast<long*>( &timeF ) );
m_pwlValList->SetItemData( idx, data );
// Sort items by timestamp
m_pwlValList->SortItems( comparePwlValues, -1 );

View File

@ -496,8 +496,6 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, bool aRecreateRatsnest )
s_PickedList.ClearItemsList();
}
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
aModule->SetPosition( (wxPoint) GetCanvas()->GetViewControls()->GetCursorPosition() );
aModule->ClearFlags();

View File

@ -889,7 +889,8 @@ void DisposeOutPts( OutPt*& pp )
inline void InitEdge( TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt )
{
std::memset( e, 0, sizeof(TEdge) );
// This clears the C++ way
*e = TEdge( { 0 } );
e->Next = eNext;
e->Prev = ePrev;