Commit Graph

4 Commits

Author SHA1 Message Date
Maciej Suminski 4a6777e0d1 Validate LIB_ITEMS::ITERATOR after erase operation 2017-09-08 08:52:01 +02:00
Maciej Suminski 4cd319b0c7 Make LIB_ITEMS::ITERATOR operator++ and end() coherent
Previous operator++() could move LIB_ITEMS::ITERATOR past the iterator
returned by LIB_ITEMS::ITERATOR::end(), potentially leading to a
segfault.
2017-09-08 08:51:59 +02:00
Seth Hillbrand 3b086360b8 Fixed a condition in LIB_ITEMS_LIST::operator[]
Fixes: lp:1714110
* https://bugs.launchpad.net/kicad/+bug/1714110
2017-09-07 00:44:40 +02:00
Maciej Suminski 352919658d Refactored LIB_PART data storage
Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.

The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.

To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
2017-08-16 16:05:22 +02:00