| 4471 | |
| 4472 | template<class VIC> |
| 4473 | void |
| 4474 | VarImp<VIC>::remove(Space& home, Propagator* p, PropCond pc) { |
| 4475 | assert(pc <= pc_max); |
| 4476 | ActorLink* a = ActorLink::cast(p); |
| 4477 | // Find actor in dependency array |
| 4478 | ActorLink** f = actor(pc); |
| 4479 | #ifdef GECODE_AUDIT |
| 4480 | while (f < actorNonZero(pc+1)) |
| 4481 | if (*f == a) |
| 4482 | goto found; |
| 4483 | else |
| 4484 | f++; |
| 4485 | GECODE_NEVER; |
| 4486 | found: ; |
| 4487 | #else |
| 4488 | while (*f != a) f++; |
| 4489 | #endif |
| 4490 | // Remove actor |
| 4491 | *f = *(actorNonZero(pc+1)-1); |
| 4492 | for (PropCond j = pc+1; j< pc_max+1; j++) { |
| 4493 | *(actorNonZero(j)-1) = *(actorNonZero(j+1)-1); |
| 4494 | idx(j)--; |
| 4495 | } |
| 4496 | *(actorNonZero(pc_max+1)-1) = b.base[entries-1]; |
| 4497 | idx(pc_max+1)--; |
| 4498 | entries--; |
| 4499 | free_and_bits += 1 << free_bits; |
| 4500 | home.pc.p.n_sub -= 1; |
| 4501 | } |
| 4502 | |
| 4503 | template<class VIC> |
| 4504 | forceinline void |
no outgoing calls
no test coverage detected