From 5bd51d65e87b93cc57e4167e3f4119c6396a8db0 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Thu, 3 Sep 2015 15:47:53 +0200
Subject: [PATCH] replace cend with end and cbegin with begin

---
 preprocessor/DynamicModel.cc |  6 +++---
 preprocessor/ExprNode.cc     | 12 ++++++------
 preprocessor/ModelTree.cc    |  4 ++--
 preprocessor/StaticModel.cc  |  6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc
index 11d3ad9a16..e69244eecd 100644
--- a/preprocessor/DynamicModel.cc
+++ b/preprocessor/DynamicModel.cc
@@ -2134,7 +2134,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
   int hessianColsNbr = dynJacobianColsNbr * dynJacobianColsNbr;
 
   // Writing Jacobian
-  temp_term_union.insert(temporary_terms_g1.cbegin(), temporary_terms_g1.cend());
+  temp_term_union.insert(temporary_terms_g1.begin(), temporary_terms_g1.end());
   if (!first_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, jacobian_output, output_type, tef_terms);
@@ -2154,7 +2154,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
     }
 
   // Writing Hessian
-  temp_term_union.insert(temporary_terms_g2.cbegin(), temporary_terms_g2.cend());
+  temp_term_union.insert(temporary_terms_g2.begin(), temporary_terms_g2.end());
   if (!second_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, hessian_output, output_type, tef_terms);
@@ -2222,7 +2222,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
     }
 
   // Writing third derivatives
-  temp_term_union.insert(temporary_terms_g3.cbegin(), temporary_terms_g3.cend());
+  temp_term_union.insert(temporary_terms_g3.begin(), temporary_terms_g3.end());
   if (!third_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, third_derivatives_output, output_type, tef_terms);
diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc
index c7d20dcda9..9805f88c48 100644
--- a/preprocessor/ExprNode.cc
+++ b/preprocessor/ExprNode.cc
@@ -1607,8 +1607,8 @@ int
 UnaryOpNode::cost(const map<NodeTreeReference, temporary_terms_t> &temp_terms_map, bool is_matlab) const
 {
   // For a temporary term, the cost is null
-  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.cbegin();
-       it != temp_terms_map.cend(); it++)
+  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.begin();
+       it != temp_terms_map.end(); it++)
     if (it->second.find(const_cast<UnaryOpNode *>(this)) != it->second.end())
       return 0;
 
@@ -2724,8 +2724,8 @@ int
 BinaryOpNode::cost(const map<NodeTreeReference, temporary_terms_t> &temp_terms_map, bool is_matlab) const
 {
   // For a temporary term, the cost is null
-  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.cbegin();
-       it != temp_terms_map.cend(); it++)
+  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.begin();
+       it != temp_terms_map.end(); it++)
     if (it->second.find(const_cast<BinaryOpNode *>(this)) != it->second.end())
       return 0;
 
@@ -3912,8 +3912,8 @@ int
 TrinaryOpNode::cost(const map<NodeTreeReference, temporary_terms_t> &temp_terms_map, bool is_matlab) const
 {
   // For a temporary term, the cost is null
-  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.cbegin();
-       it != temp_terms_map.cend(); it++)
+  for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.begin();
+       it != temp_terms_map.end(); it++)
     if (it->second.find(const_cast<TrinaryOpNode *>(this)) != it->second.end())
       return 0;
 
diff --git a/preprocessor/ModelTree.cc b/preprocessor/ModelTree.cc
index 6bd741721a..2ebbd45712 100644
--- a/preprocessor/ModelTree.cc
+++ b/preprocessor/ModelTree.cc
@@ -1130,7 +1130,7 @@ ModelTree::computeTemporaryTerms(bool is_matlab)
 
   for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.begin();
        it != temp_terms_map.end(); it++)
-    temporary_terms.insert(it->second.cbegin(), it->second.cend());
+    temporary_terms.insert(it->second.begin(), it->second.end());
 
   temporary_terms_res = temp_terms_map[eResiduals];
   temporary_terms_g1  = temp_terms_map[eFirstDeriv];
@@ -1652,7 +1652,7 @@ ModelTree::computeParamsDerivativesTemporaryTerms()
 
   for (map<NodeTreeReference, temporary_terms_t>::const_iterator it = temp_terms_map.begin();
        it != temp_terms_map.end(); it++)
-    params_derivs_temporary_terms.insert(it->second.cbegin(), it->second.cend());
+    params_derivs_temporary_terms.insert(it->second.begin(), it->second.end());
 
   params_derivs_temporary_terms_res  = temp_terms_map[eResidualsParamsDeriv];
   params_derivs_temporary_terms_g1   = temp_terms_map[eJacobianParamsDeriv];
diff --git a/preprocessor/StaticModel.cc b/preprocessor/StaticModel.cc
index b7331028f8..81b16761ea 100644
--- a/preprocessor/StaticModel.cc
+++ b/preprocessor/StaticModel.cc
@@ -1206,7 +1206,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
   int hessianColsNbr = JacobianColsNbr*JacobianColsNbr;
 
   // Write Jacobian w.r. to endogenous only
-  temp_term_union.insert(temporary_terms_g1.cbegin(), temporary_terms_g1.cend());
+  temp_term_union.insert(temporary_terms_g1.begin(), temporary_terms_g1.end());
   if (!first_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, jacobian_output, output_type, tef_terms);
@@ -1227,7 +1227,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
 
   int g2ncols = symbol_table.endo_nbr() * symbol_table.endo_nbr();
   // Write Hessian w.r. to endogenous only (only if 2nd order derivatives have been computed)
-  temp_term_union.insert(temporary_terms_g2.cbegin(), temporary_terms_g2.cend());
+  temp_term_union.insert(temporary_terms_g2.begin(), temporary_terms_g2.end());
   if (!second_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, hessian_output, output_type, tef_terms);
@@ -1294,7 +1294,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
     }
 
   // Writing third derivatives
-  temp_term_union.insert(temporary_terms_g3.cbegin(), temporary_terms_g3.cend());
+  temp_term_union.insert(temporary_terms_g3.begin(), temporary_terms_g3.end());
   if (!third_derivatives.empty())
     if (julia)
       writeTemporaryTerms(temp_term_union, third_derivatives_output, output_type, tef_terms);
-- 
GitLab