Brian, I cleaned up the coding policy issues and merged your patch. Thank you for your contribution to KiCad.
Cheers, Wayne On 3/14/19 3:02 PM, Brian wrote: > One more thing, actually: > > Wayne, please take a look at the method > SCH_LEGACY_PLUGIN_CACHE::checkForDuplicates() and the code in > SCH_LEGACY_PLUGIN_CACHE::loadPart on lines 2734 - 2770. > > It seems to me that the latter code does, in effect, exactly the same > thing that checkForDuplicates() does (renaming an alias with an > incremental number on the end). In making loadPart static, the cache > isn't visible so duplicate checks can't be done until the part is fully > parsed. > > I suppose the code can explain what I'm saying itself; take a look at > the patch I've attached, wherein I've removed the checkForDuplicates > method altogether in addition to moving the cache actions out of > loadPart into its caller, SCH_LEGACY_PLUGIN_CACHE::Load. > > Note that I've also changed several places from using std::unique_ptr< > OUTPUTFORMATTER > & to simply OUTPUTFORMATTER &, as forcing the use of a > unique_ptr means a caller can't safely provide a local (i.e. on the > stack) OUTPUTFORMATTER. > > Cheers, > -Brian > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp