summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-11-22 11:06:49 +1100
committerCarlo Zancanaro <carlo@carlo-laptop>2012-11-22 11:06:49 +1100
commit7210673084d691b0c125a5bda3c868438c19eff1 (patch)
treead340f2fc54ec8e2f060367b5db42e2c62904674 /impl
parente51b7cbae7cb644a2df2cbc62137f4529aaecef4 (diff)
A few fixes.
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();