diff options
author | Carlo Zancanaro <carlo@carlo-laptop> | 2012-11-22 11:06:49 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@carlo-laptop> | 2012-11-22 11:06:49 +1100 |
commit | 7210673084d691b0c125a5bda3c868438c19eff1 (patch) | |
tree | ad340f2fc54ec8e2f060367b5db42e2c62904674 /impl | |
parent | e51b7cbae7cb644a2df2cbc62137f4529aaecef4 (diff) |
A few fixes.
Diffstat (limited to 'impl')
-rw-r--r-- | impl/VariableAssignment.hpp | 20 |
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(); |