From e47ea565b943c1f6505d4c3cabd22cf87ca278ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 26 Apr 2022 11:32:07 +0200 Subject: [PATCH] =?UTF-8?q?Use=20booleans=20for=20=E2=80=9Cexo=5Fdet?= =?UTF-8?q?=E2=80=9D=20and=20=E2=80=9Cmultiplicative=E2=80=9D=20fields=20o?= =?UTF-8?q?f=20M=5F.det=5Fshocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Shocks.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Shocks.cc b/src/Shocks.cc index 90317742..240c464c 100644 --- a/src/Shocks.cc +++ b/src/Shocks.cc @@ -1,5 +1,5 @@ /* - * Copyright © 2003-2021 Dynare Team + * Copyright © 2003-2022 Dynare Team * * This file is part of Dynare. * @@ -47,9 +47,9 @@ AbstractShocksStatement::writeDetShocks(ostream &output) const for (const auto &[period1, period2, value] : shock_vec) { output << "M_.det_shocks = [ M_.det_shocks;" << endl - << "struct('exo_det'," << static_cast<int>(exo_det) + << "struct('exo_det'," << (exo_det ? "true" : "false") << ",'exo_id'," << symbol_table.getTypeSpecificID(id)+1 - << ",'multiplicative'," << static_cast<int>(mshocks) + << ",'multiplicative'," << (mshocks ? "true" : "false") << ",'periods'," << period1 << ":" << period2 << ",'value',"; value->writeOutput(output); -- GitLab