Re: [Kicad-developers] Multiple delete in dialog_spice_model.cpp

2019-08-30 Thread Jeff Young
Yeah, the guys that wrote the standard template library could have won awards in obfuscation. > On 30 Aug 2019, at 21:17, Seth Hillbrand wrote: > > On 2019-08-30 15:49, Sylwester Kocjan wrote: > >>m_schfields->erase( std::remove_if( >> m_schfields->begin(), m_schfields->end(),

Re: [Kicad-developers] Multiple delete in dialog_spice_model.cpp

2019-08-30 Thread Seth Hillbrand
On 2019-08-30 15:49, Sylwester Kocjan wrote: m_schfields->erase( std::remove_if( m_schfields->begin(), m_schfields->end(), [&]( const SCH_FIELD& f ) { return f.GetName() == spiceField; } ), m_schfields->end() ); My question is, why deletion is repeated

[Kicad-developers] Multiple delete in dialog_spice_model.cpp

2019-08-30 Thread Sylwester Kocjan
Hi KiCad-devs & Seth, I was looking at the code for handling spice fields and I noticed something that I either don't understand or is unnecessary. In this commit: https://github.com/KiCad/kicad-source-mirror/commit/170ff66cbbd4f17ebf6fddf24efa7b4d227c15a1 there was a change added in dialog_spic