Skip to content

Commit 9bc4831

Browse files
committed
Pass callback by reference
1 parent 0337641 commit 9bc4831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/or-tools/constraint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ void init_constraint(Rice::Module& m) {
408408
parameters.set_num_search_workers(1);
409409

410410
m.Add(NewFeasibleSolutionObserver(
411-
[callback](const CpSolverResponse& r) {
411+
[&callback](const CpSolverResponse& r) {
412412
// TODO find a better way to do this
413413
callback.call("response=", r);
414414
callback.call("on_solution_callback");

0 commit comments

Comments
 (0)