Skip to content

Commit

Permalink
windows: Fix function declaration (fix #3807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jun 5, 2023
1 parent 8ad5847 commit 2a7f872
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions ortools/constraint_solver/constraint_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ ConstraintSolverParameters Solver::DefaultSolverParameters() {
}

// ----- Forward Declarations and Profiling Support -----
extern void InstallDemonProfiler(DemonProfiler* monitor);
extern DemonProfiler* BuildDemonProfiler(Solver* solver);
extern void DeleteDemonProfiler(DemonProfiler* monitor);
extern void InstallDemonProfiler(DemonProfiler* monitor);
extern void InstallLocalSearchProfiler(LocalSearchProfiler* monitor);
extern LocalSearchProfiler* BuildLocalSearchProfiler(Solver* solver);
extern void DeleteLocalSearchProfiler(LocalSearchProfiler* monitor);
extern void InstallLocalSearchProfiler(LocalSearchProfiler* monitor);

// TODO(user): remove this complex logic.
// We need the double test because parameters are set too late when using
Expand Down Expand Up @@ -1372,18 +1372,18 @@ void Search::Accept(ModelVisitor* const visitor) const {

#undef CALL_EVENT_LISTENERS

bool LocalOptimumReached(Search* const search) {
bool LocalOptimumReached(Search* search) {
return search->LocalOptimum();
}

bool AcceptDelta(Search* const search, Assignment* delta,
bool AcceptDelta(Search* search, Assignment* delta,
Assignment* deltadelta) {
return search->AcceptDelta(delta, deltadelta);
}

void AcceptNeighbor(Search* const search) { search->AcceptNeighbor(); }
void AcceptNeighbor(Search* search) { search->AcceptNeighbor(); }

void AcceptUncheckedNeighbor(Search* const search) {
void AcceptUncheckedNeighbor(Search* search) {
search->AcceptUncheckedNeighbor();
}

Expand Down
6 changes: 3 additions & 3 deletions ortools/constraint_solver/demon_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,17 @@ void Solver::ExportProfilingOverview(const std::string& filename) {

// ----- Exported Functions -----

void InstallDemonProfiler(DemonProfiler* const monitor) { monitor->Install(); }
void InstallDemonProfiler(DemonProfiler* monitor) { monitor->Install(); }

DemonProfiler* BuildDemonProfiler(Solver* const solver) {
DemonProfiler* BuildDemonProfiler(Solver* solver) {
if (solver->IsProfilingEnabled()) {
return new DemonProfiler(solver);
} else {
return nullptr;
}
}

void DeleteDemonProfiler(DemonProfiler* const monitor) { delete monitor; }
void DeleteDemonProfiler(DemonProfiler* monitor) { delete monitor; }

Demon* Solver::RegisterDemon(Demon* const demon) {
CHECK(demon != nullptr);
Expand Down
6 changes: 3 additions & 3 deletions ortools/constraint_solver/expressions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6378,7 +6378,7 @@ IntVarIterator* BooleanVar::MakeDomainIterator(bool reversible) const {

// ----- API -----

void CleanVariableOnFail(IntVar* const var) {
void CleanVariableOnFail(IntVar* var) {
DCHECK_EQ(DOMAIN_INT_VAR, var->VarType());
DomainIntVar* const dvar = reinterpret_cast<DomainIntVar*>(var);
dvar->CleanInProcess();
Expand All @@ -6399,7 +6399,7 @@ Constraint* SetIsGreaterOrEqual(IntVar* const var,
return dvar->SetIsGreaterOrEqual(values, vars);
}

void RestoreBoolValue(IntVar* const var) {
void RestoreBoolValue(IntVar* var) {
DCHECK_EQ(BOOLEAN_VAR, var->VarType());
BooleanVar* const boolean_var = reinterpret_cast<BooleanVar*>(var);
boolean_var->RestoreValue();
Expand Down Expand Up @@ -7448,7 +7448,7 @@ void IntVar::SetValues(const std::vector<int64_t>& values) {
}
// ---------- BaseIntExpr ---------

void LinkVarExpr(Solver* const s, IntExpr* const expr, IntVar* const var) {
void LinkVarExpr(Solver* s, IntExpr* expr, IntVar* var) {
if (!var->Bound()) {
if (var->VarType() == DOMAIN_INT_VAR) {
DomainIntVar* dvar = reinterpret_cast<DomainIntVar*>(var);
Expand Down
2 changes: 1 addition & 1 deletion ortools/constraint_solver/model_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ class NonReversibleCache : public ModelCache {
};
} // namespace

ModelCache* BuildModelCache(Solver* const solver) {
ModelCache* BuildModelCache(Solver* solver) {
return new NonReversibleCache(solver);
}

Expand Down
2 changes: 1 addition & 1 deletion ortools/constraint_solver/trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ IntervalVar* Solver::RegisterIntervalVar(IntervalVar* const var) {
}
}

PropagationMonitor* BuildPrintTrace(Solver* const s) {
PropagationMonitor* BuildPrintTrace(Solver* s) {
return s->RevAlloc(new PrintTrace(s));
}
} // namespace operations_research

0 comments on commit 2a7f872

Please sign in to comment.