diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 11:45:31 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 11:45:31 +1100 |
commit | a7c69ec12aec23036bfdb6447e7c38b001a40f3d (patch) | |
tree | 03d7fc971195d623ff35e9f01773ae95bbe9a688 /impl/MaxStrategy.hpp | |
parent | bb9a899b7c45b830c6b70e2811130a41ebb31ee5 (diff) |
Fix up to build with clang (and fix another bug)
- Remove exceptions
- Remove dynamic casts
The bug was relating to MaxStrategy not cleaning up the influence sets
after propagating changes. I just added a call to .clear() and it seems
fine.
Diffstat (limited to 'impl/MaxStrategy.hpp')
-rw-r--r-- | impl/MaxStrategy.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/impl/MaxStrategy.hpp b/impl/MaxStrategy.hpp index 667c127..f330f3b 100644 --- a/impl/MaxStrategy.hpp +++ b/impl/MaxStrategy.hpp @@ -61,6 +61,7 @@ struct DynamicMaxStrategy : public MaxStrategy<Domain> { ++it) { solve(_system.maxExpression(*it)); } + _var_influence[v].clear(); } private: @@ -93,10 +94,12 @@ private: solve(_system.maxExpression(*it)); } } else { - log::strategy << indent() << x << " did not change" << std::endl; + log::strategy << indent() << x << " did not change: " + << x << " => " << *x.arguments()[val] << std::endl; } } else { - log::strategy << indent() << x << " is stable" << std::endl; + log::strategy << indent() << x << " is stable: " + << x << " => " << *x.arguments()[_values[x]] << std::endl; } } |