From 14fb833165e9be35c0ec92b031e46855fdc4ec89 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 4 Nov 2016 14:44:45 +0100 Subject: [PATCH] preprocessor: fix iterator types in ParsingDriver::svar() --- ParsingDriver.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ParsingDriver.cc b/ParsingDriver.cc index ec6bf118..cd2b7a33 100644 --- a/ParsingDriver.cc +++ b/ParsingDriver.cc @@ -2004,7 +2004,8 @@ ParsingDriver::ms_variance_decomposition() void ParsingDriver::svar() { - OptionsList::num_options_t::const_iterator it0, it1, it2; + OptionsList::string_options_t::const_iterator it0, it1, it2; + OptionsList::num_options_t::const_iterator itn; OptionsList::vec_int_options_t::const_iterator itv; it0 = options_list.string_options.find("ms.coefficients"); @@ -2023,10 +2024,10 @@ ParsingDriver::svar() && it2 != options_list.string_options.end())) error("You may only pass one of 'coefficients', 'variances', or 'constants'."); - it0 = options_list.num_options.find("ms.chain"); - if (it0 == options_list.num_options.end()) + itn = options_list.num_options.find("ms.chain"); + if (itn == options_list.num_options.end()) error("A chain option must be passed to the svar statement."); - else if (atoi(it0->second.c_str()) <= 0) + else if (atoi(itn->second.c_str()) <= 0) error("The value passed to the chain option must be greater than zero."); itv = options_list.vector_int_options.find("ms.equations");