Skip to content

Commit

Permalink
add checks
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Oct 11, 2023
1 parent cf36e1f commit 64b3a20
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ubuntu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
- develop
- ci/*
- fix/Issue-688
workflow_dispatch:
workflow_run:
workflows: [ "Publish Release" ]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
- develop
- ci/*
- fix/Issue-688
workflow_dispatch:
workflow_run:
workflows: [ "Publish Release" ]
Expand Down
8 changes: 5 additions & 3 deletions src/cpp/multisolver_interface/SolverCbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ SolverCbc::~SolverCbc() {
}

void SolverCbc::set_fp(FILE *fp) {
setvbuf(fp, nullptr, _IONBF, 0);
_clp_inner_solver.messageHandler()->setFilePointer(fp);
_cbc.messageHandler()->setFilePointer(fp);
if (fp) {
setvbuf(fp, nullptr, _IONBF, 0);
_clp_inner_solver.messageHandler()->setFilePointer(fp);
_cbc.messageHandler()->setFilePointer(fp);
}
}

int SolverCbc::get_number_of_instances() { return _NumberOfProblems; }
Expand Down
6 changes: 4 additions & 2 deletions src/cpp/multisolver_interface/SolverClp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ SolverClp::~SolverClp() {
}

void SolverClp::set_fp(FILE *fp) {
setvbuf(_fp, nullptr, _IONBF, 0);
_clp.messageHandler()->setFilePointer(_fp);
if (fp) {
setvbuf(_fp, nullptr, _IONBF, 0);
_clp.messageHandler()->setFilePointer(_fp);
}
}

int SolverClp::get_number_of_instances() { return _NumberOfProblems; }
Expand Down

0 comments on commit 64b3a20

Please sign in to comment.