diff options
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/vec/vecInt.h | 5 | ||||
-rw-r--r-- | src/misc/vec/vecPtr.h | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 613b5437..824846b4 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -480,6 +480,11 @@ static inline void Vec_IntUpdateEntry( Vec_Int_t * p, int i, int Value ) if ( Vec_IntEntry( p, i ) < Value ) Vec_IntWriteEntry( p, i, Value ); } +static inline void Vec_IntDowndateEntry( Vec_Int_t * p, int i, int Value ) +{ + if ( Vec_IntEntry( p, i ) > Value ) + Vec_IntWriteEntry( p, i, Value ); +} /**Function************************************************************* diff --git a/src/misc/vec/vecPtr.h b/src/misc/vec/vecPtr.h index ee1674fb..d0204ebb 100644 --- a/src/misc/vec/vecPtr.h +++ b/src/misc/vec/vecPtr.h @@ -558,14 +558,18 @@ static inline void Vec_PtrClear( Vec_Ptr_t * p ) SeeAlso [] ***********************************************************************/ -static inline void Vec_PtrFreeFree( Vec_Ptr_t * p ) +static inline void Vec_PtrFreeData( Vec_Ptr_t * p ) { - void * pTemp; - int i; + void * pTemp; int i; if ( p == NULL ) return; Vec_PtrForEachEntry( void *, p, pTemp, i ) if ( pTemp != (void *)(ABC_PTRINT_T)1 && pTemp != (void *)(ABC_PTRINT_T)2 ) ABC_FREE( pTemp ); +} +static inline void Vec_PtrFreeFree( Vec_Ptr_t * p ) +{ + if ( p == NULL ) return; + Vec_PtrFreeData( p ); Vec_PtrFree( p ); } |