#include "xbt/error.h"
#include "maxmin_private.h"
#include <stdlib.h>
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(maxmin, surf,
+ "Logging specific to the SURF maxminmodule");
lmm_system_t lmm_system_new(void)
{
static void lmm_cnst_free(lmm_system_t sys, lmm_constraint_t cnst)
{
-/* xbt_assert0(xbt_fifo_size(&(cnst->row)), */
-/* "This list should be empty!"); */
+ xbt_assert0(xbt_swag_size(&(cnst->element_set)),
+ "This list should be empty!");
remove_active_constraint(sys, cnst);
xbt_free(cnst);
}
sys->modified = 1;
- if (var->cnsts_number >= var->cnsts_size)
- abort();
+ xbt_assert0(var->cnsts_number >= var->cnsts_size,
+ "Too much constraints");
elem = &(var->cnsts[var->cnsts_number++]);
*/
double xbt_heap_maxkey(xbt_heap_t H)
{
- if (H->count == 0)
- abort();
+ xbt_assert0(H->count != 0,"Empty heap");
return KEY(H, 0);
}
*/
void *xbt_heap_maxcontent(xbt_heap_t H)
{
- if (H->count == 0)
- abort();
+ xbt_assert0(H->count != 0,"Empty heap");
return CONTENT(H, 0);
}