[PPL-devel] [GIT] ppl/ppl(master): When wrapping no variable, do not ignore the optional constraint system.

Enea Zaffanella zaffanella at cs.unipr.it
Fri May 15 08:03:29 CEST 2009


Module: ppl/ppl
Branch: master
Commit: d286a5a4f475a875c6ca967d699512f5a82a726c
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=d286a5a4f475a875c6ca967d699512f5a82a726c

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Fri May 15 07:46:59 2009 +0200

When wrapping no variable, do not ignore the optional constraint system.

---

 src/Box.templates.hh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/Box.templates.hh b/src/Box.templates.hh
index 3cef96e..e6117a2 100644
--- a/src/Box.templates.hh
+++ b/src/Box.templates.hh
@@ -1433,9 +1433,12 @@ Box<ITV>::wrap_assign(const Variables_Set& vars,
   if (pcs != 0 && pcs->space_dimension() > space_dim)
     throw_dimension_incompatible("wrap_assign(vars, w, s, o, pcs, ...)", *pcs);
 
-  // Wrapping no variable is a no-op.
-  if (vars.empty())
+  // Wrapping no variable only requires refining with *pcs, if any.
+  if (vars.empty()) {
+    if (pcs != 0)
+      pointset.refine_with_constraints(*pcs);
     return;
+  }
 
   // Dimension-compatibility check.
   const dimension_type vars_space_dim = vars.space_dimension();




More information about the PPL-devel mailing list