summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
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();