From bb9a899b7c45b830c6b70e2811130a41ebb31ee5 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 20 Sep 2012 15:19:49 +1000 Subject: Remove exceptions and C++11 features for LLVM. --- impl/MaxStrategy.hpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'impl/MaxStrategy.hpp') diff --git a/impl/MaxStrategy.hpp b/impl/MaxStrategy.hpp index d15884c..667c127 100644 --- a/impl/MaxStrategy.hpp +++ b/impl/MaxStrategy.hpp @@ -36,9 +36,9 @@ struct DynamicMaxStrategy : public MaxStrategy { _values(system.maxExpressionCount(), 0), _stable(system.maxExpressionCount()), _influence(system.maxExpressionCount(), - IdSet>(system.maxExpressionCount())), + IdSet >(system.maxExpressionCount())), _var_influence(system.variableCount(), - IdSet>(system.maxExpressionCount())) + IdSet >(system.maxExpressionCount())) {} void setRho(DynamicVariableAssignment& rho) { @@ -54,8 +54,10 @@ struct DynamicMaxStrategy : public MaxStrategy { log::strategy << indent() << "Invalidating " << v << " - " << *_system[v] << std::endl; _stable.filter(_var_influence[v]); - for (auto it = _var_influence[v].begin(); - it != _var_influence[v].end(); + for (typename IdSet >::iterator + it = _var_influence[v].begin(), + end = _var_influence[v].end(); + it != end; ++it) { solve(_system.maxExpression(*it)); } @@ -75,7 +77,7 @@ private: if (val != _values[x]) { log::strategy << x << " => " << *x.arguments()[val] << std::endl; - auto oldInfluence = _influence[x]; + IdSet > oldInfluence = _influence[x]; _influence[x].clear(); _values[x] = val; @@ -83,8 +85,10 @@ private: _stable.filter(oldInfluence); - for (auto it = oldInfluence.begin(); - it != oldInfluence.end(); + for (typename IdSet >::iterator + it = oldInfluence.begin(), + end = oldInfluence.end(); + it != end; ++it) { solve(_system.maxExpression(*it)); } @@ -135,9 +139,9 @@ private: const EquationSystem& _system; mutable DynamicVariableAssignment* _rho; mutable IdMap,unsigned int> _values; - mutable IdSet> _stable; - mutable IdMap,IdSet>> _influence; - mutable IdMap,IdSet>> _var_influence; + mutable IdSet > _stable; + mutable IdMap,IdSet > > _influence; + mutable IdMap,IdSet > > _var_influence; }; /*template -- cgit v1.2.3