remove superfluous asserts

parent fd3b88a2
...@@ -34,7 +34,6 @@ function write(o, fid, pg, sec, row, col, rep_dir) ...@@ -34,7 +34,6 @@ function write(o, fid, pg, sec, row, col, rep_dir)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
graphName = writeGraphFile(o, pg, sec, row, col, rep_dir); graphName = writeGraphFile(o, pg, sec, row, col, rep_dir);
fprintf(fid, '\\input{%s}', graphName); fprintf(fid, '\\input{%s}', graphName);
end end
\ No newline at end of file
...@@ -31,8 +31,6 @@ function write(o, fid, pg, rep_dir) ...@@ -31,8 +31,6 @@ function write(o, fid, pg, rep_dir)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
fprintf(fid, '\n%% Page Number %d written %s\n', pg, datestr(now)); fprintf(fid, '\n%% Page Number %d written %s\n', pg, datestr(now));
if strcmpi(o.orientation, 'landscape') if strcmpi(o.orientation, 'landscape')
fprintf(fid, '\\begin{landscape}\n'); fprintf(fid, '\\begin{landscape}\n');
......
...@@ -29,7 +29,6 @@ function write(o, fid) ...@@ -29,7 +29,6 @@ function write(o, fid)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
fprintf(fid, '%% Paragraph Object written %s\n', datestr(now)); fprintf(fid, '%% Paragraph Object written %s\n', datestr(now));
fprintf(fid, '\\multicolumn{1}{p{\\linewidth}}{%%\n'); fprintf(fid, '\\multicolumn{1}{p{\\linewidth}}{%%\n');
if o.cols ~= 1 if o.cols ~= 1
......
...@@ -31,10 +31,6 @@ function writeDataForTable(o, fid, precision) ...@@ -31,10 +31,6 @@ function writeDataForTable(o, fid, precision)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
%% Validate options passed to function
assert(fid ~= -1);
assert(isint(precision));
%% Validate options provided by user %% Validate options provided by user
assert(ischar(o.tableSubSectionHeader), '@report_data.writeDataForTable: tableSubSectionHeader must be a string'); assert(ischar(o.tableSubSectionHeader), '@report_data.writeDataForTable: tableSubSectionHeader must be a string');
if isempty(o.tableSubSectionHeader) if isempty(o.tableSubSectionHeader)
......
...@@ -35,7 +35,6 @@ function writeSeriesForTable(o, fid, dates, precision, ncols, rowcolor) ...@@ -35,7 +35,6 @@ function writeSeriesForTable(o, fid, dates, precision, ncols, rowcolor)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
%% Validate options passed to function %% Validate options passed to function
assert(fid ~= -1);
for i=1:length(dates) for i=1:length(dates)
assert(isdates(dates{i})); assert(isdates(dates{i}));
end end
......
...@@ -34,7 +34,6 @@ function write(o, fid, pg, sec, row, col, rep_dir) ...@@ -34,7 +34,6 @@ function write(o, fid, pg, sec, row, col, rep_dir)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
tableName = writeTableFile(o, pg, sec, row, col, rep_dir); tableName = writeTableFile(o, pg, sec, row, col, rep_dir);
fprintf(fid, '\\input{%s}', tableName); fprintf(fid, '\\input{%s}', tableName);
end end
...@@ -32,7 +32,6 @@ function write(o, fid, pg, sec, rep_dir) ...@@ -32,7 +32,6 @@ function write(o, fid, pg, sec, rep_dir)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
fprintf(fid, '%% Section Object written %s\n', datestr(now)); fprintf(fid, '%% Section Object written %s\n', datestr(now));
if isempty(o.elements) if isempty(o.elements)
warning(['reporting:section.write(): trying to print a section ' ... warning(['reporting:section.write(): trying to print a section ' ...
......
...@@ -29,8 +29,6 @@ function o = write(o, fid) ...@@ -29,8 +29,6 @@ function o = write(o, fid)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(fid ~= -1);
fprintf(fid, repmat(' \\par \\medskip ', 1, o.number)); fprintf(fid, repmat(' \\par \\medskip ', 1, o.number));
if o.hline > 0 if o.hline > 0
fprintf(fid, ['\\\\\n' repmat('\\midrule', 1, o.hline)]); fprintf(fid, ['\\\\\n' repmat('\\midrule', 1, o.hline)]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment