summaryrefslogtreecommitdiffstats
path: root/src/misc/vec
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-06-10 21:31:10 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-06-10 21:31:10 -0700
commit93d89eaaeb6f87d972d4ef29d7c858d2cceabe57 (patch)
treed2c75f745a00ebde565ae65090a3ba9f1b1c8ce2 /src/misc/vec
parent9c8db2830f16b6deb50541c5693ed14a2240c659 (diff)
downloadabc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.tar.gz
abc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.tar.bz2
abc-93d89eaaeb6f87d972d4ef29d7c858d2cceabe57.zip
Various modifications.
Diffstat (limited to 'src/misc/vec')
-rw-r--r--src/misc/vec/vecInt.h5
-rw-r--r--src/misc/vec/vecPtr.h10
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 );
}