diff options
Diffstat (limited to 'clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp')
-rw-r--r-- | clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp b/clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp index 5ee5405..3342cc7 100644 --- a/clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp +++ b/clang/include/clang/Analysis/Analyses/IntervalSolver/EquationSystem.hpp @@ -76,14 +76,9 @@ struct EquationSystem { } Constant<Domain>& constant(const Domain& value) { - if (_constants.find(value) == _constants.end()) { - Constant<Domain>* constant = new Constant<Domain>(value); - _expressions.insert(constant); - _constants[value] = constant; - return *constant; - } else { - return *_constants[value]; - } + Constant<Domain>* constant = new Constant<Domain>(value); + _expressions.insert(constant); + return *constant; } MaxExpression<Domain>* operator[](const Variable<Domain>& var) const { @@ -132,7 +127,6 @@ struct EquationSystem { private: std::set<Operator<Domain>*> _operators; std::set<Expression<Domain>*> _expressions; - std::map<Domain,Constant<Domain>*> _constants; std::vector<Variable<Domain>*> _variables; std::map<std::string, Variable<Domain>*> _variable_names; IdMap<MaxExpression<Domain>, Variable<Domain>*>* _expr_to_var; |