From f1abbe724f3f35507f2c37fdfe524eb9aa54bc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr> Date: Mon, 14 Jun 2010 12:24:04 +0200 Subject: [PATCH] Preprocessor: cosmetic changes related to 'size_t' --- preprocessor/DynamicModel.cc | 2 +- preprocessor/ParsingDriver.cc | 2 +- preprocessor/Shocks.cc | 2 +- preprocessor/SigmaeInitialization.cc | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc index 4df16e6c87..6e4e3ed5ce 100644 --- a/preprocessor/DynamicModel.cc +++ b/preprocessor/DynamicModel.cc @@ -1904,7 +1904,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de // Write equation tags output << "M_.equations_tags = {" << endl; - for (unsigned int i = 0; i < equation_tags.size(); i++) + for (size_t i = 0; i < equation_tags.size(); i++) output << " " << equation_tags[i].first + 1 << " , '" << equation_tags[i].second.first << "' , '" << equation_tags[i].second.second << "' ;" << endl; diff --git a/preprocessor/ParsingDriver.cc b/preprocessor/ParsingDriver.cc index b7abea8ae1..38f08a1e2b 100644 --- a/preprocessor/ParsingDriver.cc +++ b/preprocessor/ParsingDriver.cc @@ -493,7 +493,7 @@ ParsingDriver::add_det_shock(string *var, bool conditional_forecast) vector<ShocksStatement::DetShockElement> v; - for (unsigned int i = 0; i < det_shocks_periods.size(); i++) + for (size_t i = 0; i < det_shocks_periods.size(); i++) { ShocksStatement::DetShockElement dse; dse.period1 = det_shocks_periods[i].first; diff --git a/preprocessor/Shocks.cc b/preprocessor/Shocks.cc index 0fd26ea31d..da3981e334 100644 --- a/preprocessor/Shocks.cc +++ b/preprocessor/Shocks.cc @@ -46,7 +46,7 @@ AbstractShocksStatement::writeDetShocks(ostream &output) const bool exo_det = (symbol_table.getType(it->first) == eExogenousDet); int set_shocks_index = ((int) mshocks) + 2 * ((int) exo_det); - for (unsigned int i = 0; i < it->second.size(); i++) + for (size_t i = 0; i < it->second.size(); i++) { const int &period1 = it->second[i].period1; const int &period2 = it->second[i].period2; diff --git a/preprocessor/SigmaeInitialization.cc b/preprocessor/SigmaeInitialization.cc index 6228e46cb5..4d3d4e71ca 100644 --- a/preprocessor/SigmaeInitialization.cc +++ b/preprocessor/SigmaeInitialization.cc @@ -28,7 +28,7 @@ SigmaeStatement::SigmaeStatement(const matrix_type &matrix_arg) throw (MatrixFor SigmaeStatement::matrix_form_type SigmaeStatement::determineMatrixForm(const matrix_type &matrix) throw (MatrixFormException) { - unsigned int nbe; + size_t nbe; int inc; matrix_form_type type; // Checking if first or last row has one element. @@ -61,8 +61,7 @@ SigmaeStatement::determineMatrixForm(const matrix_type &matrix) throw (MatrixFor void SigmaeStatement::writeOutput(ostream &output, const string &basename) const { - unsigned int ic, ic1; - unsigned int ir, ir1; + size_t ic, ic1, ir, ir1; output << "M_.Sigma_e = [..." << endl; for (ir = 0; ir < matrix.size(); ir++) -- GitLab