Formatting.
This commit is contained in:
parent
d5c3a4036c
commit
98496dfa60
|
@ -494,11 +494,13 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( const PNS::ITEM* aA, const PNS::ITEM* a
|
||||||
|
|
||||||
// Search cache (used for actual board items)
|
// Search cache (used for actual board items)
|
||||||
auto it = m_clearanceCache.find( key );
|
auto it = m_clearanceCache.find( key );
|
||||||
|
|
||||||
if( it != m_clearanceCache.end() )
|
if( it != m_clearanceCache.end() )
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
||||||
// Search cache (used for temporary items within an algorithm)
|
// Search cache (used for temporary items within an algorithm)
|
||||||
it = m_tempClearanceCache.find( key );
|
it = m_tempClearanceCache.find( key );
|
||||||
|
|
||||||
if( it != m_tempClearanceCache.end() )
|
if( it != m_tempClearanceCache.end() )
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
||||||
|
@ -567,14 +569,17 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( const PNS::ITEM* aA, const PNS::ITEM* a
|
||||||
if( aUseClearanceEpsilon && rv > 0 )
|
if( aUseClearanceEpsilon && rv > 0 )
|
||||||
rv = std::max( 0, rv - m_clearanceEpsilon );
|
rv = std::max( 0, rv - m_clearanceEpsilon );
|
||||||
|
|
||||||
|
/*
|
||||||
/* It makes no sense to put items that have no owning NODE in the cache - they can be allocated on stack
|
* It makes no sense to put items that have no owning NODE in the cache - they can be
|
||||||
and we can't really invalidate them in the cache when they are destroyed. Probably a better idea would be
|
* allocated on stack and we can't really invalidate them in the cache when they are
|
||||||
to use a static unique counter in PNS::ITEM constructor to generate the cache keys. */
|
* destroyed. Probably a better idea would be to use a static unique counter in PNS::ITEM
|
||||||
/* However, algorithms DO greatly benefit from using the cache, so ownerless items need to be cached.
|
* constructor to generate the cache keys.
|
||||||
In order to easily clear those only, a temporary cache is created. If this doesn't seem nice, an alternative
|
*
|
||||||
is clearing the full cache once it reaches a certain size. Also not pretty, but VERY effective
|
* However, algorithms DO greatly benefit from using the cache, so ownerless items need to be
|
||||||
to keep things interactive. */
|
* cached. In order to easily clear those only, a temporary cache is created. If this doesn't
|
||||||
|
* seem nice, an alternative is clearing the full cache once it reaches a certain size. Also
|
||||||
|
* not pretty, but VERY effective to keep things interactive.
|
||||||
|
*/
|
||||||
if( aA && aB )
|
if( aA && aB )
|
||||||
{
|
{
|
||||||
if ( aA->Owner() && aB->Owner() )
|
if ( aA->Owner() && aB->Owner() )
|
||||||
|
|
Loading…
Reference in New Issue