Skip to content

Commit e95c52f

Browse files
committed
use new sorting function SCIPsortRealPtrPtr()
1 parent 58dbbd4 commit e95c52f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/scip/cons_cardinality.c

+1-11
Original file line numberDiff line numberDiff line change
@@ -3745,21 +3745,11 @@ SCIP_RETCODE SCIPcreateConsCardinality(
37453745
/* check weights */
37463746
if( weights != NULL )
37473747
{
3748-
int* dummy;
3749-
37503748
/* store weights */
37513749
SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &consdata->weights, weights, nvars) );
37523750

3753-
/* create dummy array to make code compatible with SCIP 3.2.0
3754-
* (the function SCIPsortRealPtrPtr() is not available) */
3755-
SCIP_CALL( SCIPallocBufferArray(scip, &dummy, nvars) );
3756-
for( v = 0; v < nvars; ++v )
3757-
dummy[v] = 0;
3758-
37593751
/* sort variables - ascending order */
3760-
SCIPsortRealPtrPtrInt(consdata->weights, (void**)consdata->vars, (void**)consdata->indvars, dummy, nvars);
3761-
3762-
SCIPfreeBufferArray(scip, &dummy);
3752+
SCIPsortRealPtrPtr(consdata->weights, (void**)consdata->vars, (void**)consdata->indvars, nvars);
37633753
}
37643754
}
37653755
else

0 commit comments

Comments
 (0)