From 86c54ea5c7fa585e56eb6fcb52328a468334c98c Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 21 Dec 2022 14:18:16 +0100 Subject: [PATCH] Use solver_problem2str() convenience function in the demo solver --- examples/solv/solv.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/examples/solv/solv.c b/examples/solv/solv.c index f7c0468b..22395306 100644 --- a/examples/solv/solv.c +++ b/examples/solv/solv.c @@ -788,16 +788,7 @@ rerunsolver: for (problem = 1; problem <= pcnt; problem++) { int take = 0; - Id rid; - printf("Problem %d/%d:\n", problem, pcnt); - rid = solver_findproblemrule(solv, problem); - if (rid) - { - Id source, target, dep; - SolverRuleinfo type = solver_ruleinfo(solv, rid, &source, &target, &dep); - printf("%s\n", solver_problemruleinfo2str(solv, type, source, target, dep)); - } - printf("\n"); + printf("Problem %d/%d:\n%s\n\n", problem, pcnt, solver_problem2str(solv, problem)); scnt = solver_solution_count(solv, problem); for (solution = 1; solution <= scnt; solution++) { -- 2.47.2