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/Operator.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/Operator.hpp')
-rw-r--r-- | impl/Operator.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/impl/Operator.hpp b/impl/Operator.hpp index b67591f..cf3ffed 100644 --- a/impl/Operator.hpp +++ b/impl/Operator.hpp @@ -47,8 +47,7 @@ struct Minimum : public Operator<Domain> { template<typename Domain> struct Negation : public Operator<Domain> { virtual Domain eval(const std::vector<Domain>& arguments) const { - if (arguments.size() > 1) - throw "Too many arguments to a negation."; + assert(arguments.size() == 1); return -arguments[0]; } void print(std::ostream& cout) const { |