Compiler problems.

This commit is contained in:
Alan Mishchenko 2014-10-21 20:24:13 -07:00
parent c49f35835b
commit 5c93850553
2 changed files with 6 additions and 2 deletions

View File

@ -66,7 +66,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
//#define USE_MINISAT22
#define USE_MINISAT22
static int Abc_CommandPrintStats ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandPrintExdc ( Abc_Frame_t * pAbc, int argc, char ** argv );
@ -13272,6 +13272,8 @@ int Abc_CommandMinisat( Abc_Frame_t * pAbc, int argc, char ** argv )
#ifdef USE_MINISAT22
extern int MainSat(int argc, char** argv);
MainSat( argc, argv );
#else
printf( "This command is currently disabled.\n" );
#endif
return 1;
}
@ -13280,6 +13282,8 @@ int Abc_CommandMinisimp( Abc_Frame_t * pAbc, int argc, char ** argv )
#ifdef USE_MINISAT22
extern int MainSimp(int argc, char** argv);
MainSimp( argc, argv );
#else
printf( "This command is currently disabled.\n" );
#endif
return 1;
}

View File

@ -96,7 +96,7 @@ template<class T>
void vec<T>::capacity(int min_cap) {
if (cap >= min_cap) return;
int add = imax((min_cap - cap + 1) & ~1, ((cap >> 1) + 2) & ~1); // NOTE: grow by approximately 3/2
if (add > INT_MAX - cap || ((data = (T*)::realloc(data, (cap += add) * sizeof(T))) == NULL) && errno == ENOMEM)
if (add > INT_MAX - cap || (((data = (T*)::realloc(data, (cap += add) * sizeof(T))) == NULL) && errno == ENOMEM))
throw OutOfMemoryException();
}