Browse Source

Clear some compile warnings

pull/15/head
Seth Hillbrand 7 years ago
parent
commit
fb3d1bdb59
  1. 4
      eeschema/dialogs/dialog_spice_model.cpp
  2. 2
      pcbnew/load_select_footprint.cpp
  3. 3
      polygon/clipper.cpp

4
eeschema/dialogs/dialog_spice_model.cpp

@ -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 );

2
pcbnew/load_select_footprint.cpp

@ -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();

3
polygon/clipper.cpp

@ -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;

Loading…
Cancel
Save