diff --git a/src/@page/page.m b/src/@page/page.m index cbf2fa0dbb052f012365bd5794a984fb9b1a5822..89ad9a580e68ab910608df3c516e284a5a75e6d3 100644 --- a/src/@page/page.m +++ b/src/@page/page.m @@ -1,7 +1,7 @@ classdef page < handle % page Class % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -65,9 +65,13 @@ classdef page < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@paragraph/paragraph.m b/src/@paragraph/paragraph.m index 01dee6b8faf636b428072685bb6f6ad50a7042d6..22ceffddba1ce693d0e9e6428ffbc2860c7fd98f 100644 --- a/src/@paragraph/paragraph.m +++ b/src/@paragraph/paragraph.m @@ -1,7 +1,7 @@ classdef paragraph < handle % paragraph Class % - % Copyright © 2014-2019 Dynare Team + % Copyright © 2014-2022 Dynare Team % % This file is part of Dynare. % @@ -54,9 +54,13 @@ classdef paragraph < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end for pair = reshape(varargin, 2, []) ind = find(strcmpi(optNames, pair{1})); diff --git a/src/@report/report.m b/src/@report/report.m index 29ae4af04e5e009abda658ec8cfad3cfa1504d97..9d8fb6067c5b8c65242d6ee9a1b2e052b1ef6e58 100644 --- a/src/@report/report.m +++ b/src/@report/report.m @@ -1,7 +1,7 @@ classdef report < handle % report Class % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -64,9 +64,13 @@ classdef report < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@report_data/report_data.m b/src/@report_data/report_data.m index 7a0cb0751d157d0cbc156df95a748358c0826996..22bbdafa8bc117428a6b4f024a267a7f7a8d7658 100644 --- a/src/@report_data/report_data.m +++ b/src/@report_data/report_data.m @@ -1,7 +1,7 @@ classdef report_data < handle % report_data Class to write a page to the report % - % Copyright © 2019 Dynare Team + % Copyright © 2019-2022 Dynare Team % % This file is part of Dynare. % @@ -57,9 +57,13 @@ classdef report_data < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@report_graph/report_graph.m b/src/@report_graph/report_graph.m index 10e816e220ffe1879ff8ba7089eb38d377ec61b8..6d81f4e3dfaad30d83a9c3d84a22d0e7e27438ec 100644 --- a/src/@report_graph/report_graph.m +++ b/src/@report_graph/report_graph.m @@ -1,7 +1,7 @@ classdef report_graph < handle % report_graph Class % - % Copyright © 2013-2020 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -91,9 +91,13 @@ classdef report_graph < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@report_series/report_series.m b/src/@report_series/report_series.m index 5eeff8e1e2834bf2286060615c95134c295f94af..15a882c575c793ed7a277a06be7d438eac41293b 100644 --- a/src/@report_series/report_series.m +++ b/src/@report_series/report_series.m @@ -1,7 +1,7 @@ classdef report_series < handle % report_series Class to write a page to the report % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -79,9 +79,13 @@ classdef report_series < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@report_table/report_table.m b/src/@report_table/report_table.m index 31f1f7cbf3502d8128b591c2aac9f5941aacef36..af60e08984054802e6feda997c6be6974c89aeeb 100644 --- a/src/@report_table/report_table.m +++ b/src/@report_table/report_table.m @@ -1,7 +1,7 @@ classdef report_table < handle % report_table Class % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -73,9 +73,13 @@ classdef report_table < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@section/section.m b/src/@section/section.m index 126e249691c12647b939cc556a12e5cc1841d486..05a7fc0f3bb451a5e467dd980406696c7ff133ac 100644 --- a/src/@section/section.m +++ b/src/@section/section.m @@ -1,7 +1,7 @@ classdef section < handle % section Class % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -53,9 +53,13 @@ classdef section < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, []) diff --git a/src/@vspace/vspace.m b/src/@vspace/vspace.m index b605500f77642649fa25e2a1dfb27c374357d12c..85a39b1fbeb03df75f1d836fbe608294d687b11e 100644 --- a/src/@vspace/vspace.m +++ b/src/@vspace/vspace.m @@ -1,7 +1,7 @@ classdef vspace < handle % vspace Class % - % Copyright © 2013-2019 Dynare Team + % Copyright © 2013-2022 Dynare Team % % This file is part of Dynare. % @@ -50,9 +50,13 @@ classdef vspace < handle end % Octave 5.1.0 has not implemented `properties` and issues a warning when using `fieldnames` - warning('off') + if isoctave + warnstate = warning('off', 'Octave:classdef-to-struct'); + end optNames = fieldnames(o); - warning('on') + if isoctave + warning(warnstate); + end % overwrite default values for pair = reshape(varargin, 2, [])