summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-26 14:00:10 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-11-26 14:00:10 +1100
commit7ad1aed1a3ba88e2c40c82da05b9bf35eedc4096 (patch)
treec85fd1eac0a0be0b10a7892a1ec81fe8d07f6c56 /impl
parentf823ccc928ae09a63ffef5b6cfe47966e2da1890 (diff)
parent7210673084d691b0c125a5bda3c868438c19eff1 (diff)
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'impl')
-rw-r--r--impl/VariableAssignment.hpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/impl/VariableAssignment.hpp b/impl/VariableAssignment.hpp
index 67896ef..2967fb6 100644
--- a/impl/VariableAssignment.hpp
+++ b/impl/VariableAssignment.hpp
@@ -60,17 +60,15 @@ struct DynamicVariableAssignment : public VariableAssignment<Domain> {
IdSet<Variable<Domain> > get_changed() {
IdSet<Variable<Domain> > changed;
- if (_touched.size() > 0) {
- for (typename IdSet<Variable<Domain> >::iterator
- it = _touched.begin(),
- ei = _touched.end();
- it != ei;
- ++it) {
- Variable<Domain>& var = _system.variable(*it);
- if (!_unstable.contains(var) && _old_values[var] != _values[var]) {
- changed.insert(var);
- _touched.remove(var);
- }
+ for (typename IdSet<Variable<Domain> >::iterator
+ it = _touched.begin(),
+ ei = _touched.end();
+ it != ei;
+ ++it) {
+ Variable<Domain>& var = _system.variable(*it);
+ if (!_unstable.contains(var) && _old_values[var] != _values[var]) {
+ changed.insert(var);
+ _touched.remove(var);
}
}
//_touched.clear();