Skip to content

Commit 1b53405

Browse files
committed
improve snippets
- shorter SnippetCodeStyleIfFor - assert scip non-null in public
1 parent 3654a0c commit 1b53405

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/scip/branch_relpscost.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,11 @@ SCIP_RETCODE countNonlinearities(
437437
/* get active index of resultant */
438438
probindex = SCIPvarGetProbindex(SCIPvarGetProbvar(andres));
439439

440-
/**! [SnippetCodeStyleIfFor] */
441440
/* the resultant might be deleted */
442441
if( probindex >= 0 )
443442
++nlcount[probindex];
444443

444+
/**! [SnippetCodeStyleIfFor] */
445445
for( v = 0; v < nandvars; ++v )
446446
{
447447
/* get active index of operator */
@@ -625,7 +625,6 @@ SCIP_RETCODE addBdchg(
625625
}
626626

627627
/**! [SnippetCodeStyleStaticAsserts] */
628-
629628
/** frees bound change arrays */
630629
static
631630
void freeBdchgs(
@@ -636,11 +635,11 @@ void freeBdchgs(
636635
int* nbdchgs /**< pointer to number of bound changes */
637636
)
638637
{
638+
assert(scip != NULL);
639639
assert(bdchginds != NULL);
640640
assert(bdchgtypes != NULL);
641641
assert(bdchgbounds != NULL);
642642
assert(nbdchgs != NULL);
643-
644643
/**! [SnippetCodeStyleStaticAsserts] */
645644

646645
SCIPfreeBufferArrayNull(scip, bdchgbounds);

0 commit comments

Comments
 (0)