From ecb4d9039a348c69c423bf90863a776dc8f72205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 22 Jun 2009 11:47:04 +0200 Subject: [PATCH] A _count is an unsigned int, not an Id --- src/problems.c | 6 +++--- src/problems.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/problems.c b/src/problems.c index 57bb545..ccdb54c 100644 --- a/src/problems.c +++ b/src/problems.c @@ -606,7 +606,7 @@ create_solutions(Solver *solv, int probnr, int solidx) /**************************************************************************/ -Id +unsigned int solver_problem_count(Solver *solv) { return solv->problems.count / 2; @@ -620,7 +620,7 @@ solver_next_problem(Solver *solv, Id problem) return (problem + 1) * 2 - 1 < solv->problems.count ? problem + 1 : 0; } -Id +unsigned int solver_solution_count(Solver *solv, Id problem) { Id solidx = solv->problems.elements[problem * 2 - 1]; @@ -638,7 +638,7 @@ solver_next_solution(Solver *solv, Id problem, Id solution) return solv->solutions.elements[solidx + solution + 1] ? solution + 1 : 0; } -Id +unsigned int solver_solutionelement_count(Solver *solv, Id problem, Id solution) { Id solidx = solv->problems.elements[problem * 2 - 1]; diff --git a/src/problems.h b/src/problems.h index b2ed55b..fc9ac18 100644 --- a/src/problems.h +++ b/src/problems.h @@ -28,11 +28,11 @@ void solver_disableproblem(struct _Solver *solv, Id v); void solver_enableproblem(struct _Solver *solv, Id v); int solver_prepare_solutions(struct _Solver *solv); -Id solver_problem_count(struct _Solver *solv); +unsigned int solver_problem_count(struct _Solver *solv); Id solver_next_problem(struct _Solver *solv, Id problem); -Id solver_solution_count(struct _Solver *solv, Id problem); +unsigned int solver_solution_count(struct _Solver *solv, Id problem); Id solver_next_solution(struct _Solver *solv, Id problem, Id solution); -Id solver_solutionelement_count(struct _Solver *solv, Id problem, Id solution); +unsigned int solver_solutionelement_count(struct _Solver *solv, Id problem, Id solution); Id solver_next_solutionelement(struct _Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp); void solver_take_solutionelement(struct _Solver *solv, Id p, Id rp, Queue *job); -- 2.7.4