Do not pass list of columns parameter by value

There is no need for copying this information.

Noticed by coverity scan.
This commit is contained in:
Jean-Marc Lasgouttes 2024-01-12 12:16:31 +01:00
parent 59b08c8171
commit 952851a9bc
2 changed files with 15 additions and 15 deletions

View File

@ -2599,8 +2599,8 @@ bool Tabular::isPartOfMultiRow(row_type row, col_type column) const
} }
void Tabular::TeXTopHLine(otexstream & os, row_type row, list<col_type> columns, void Tabular::TeXTopHLine(otexstream & os, row_type row, list<col_type> const & columns,
list<col_type> logical_columns) const list<col_type> const & logical_columns) const
{ {
// we only output complete row lines and the 1st row here, the rest // we only output complete row lines and the 1st row here, the rest
// is done in Tabular::TeXBottomHLine(...) // is done in Tabular::TeXBottomHLine(...)
@ -2716,8 +2716,8 @@ void Tabular::TeXTopHLine(otexstream & os, row_type row, list<col_type> columns,
} }
void Tabular::TeXBottomHLine(otexstream & os, row_type row, list<col_type> columns, void Tabular::TeXBottomHLine(otexstream & os, row_type row, list<col_type> const & columns,
list<col_type> logical_columns) const list<col_type> const & logical_columns) const
{ {
// we output bottomlines of row r and the toplines of row r+1 // we output bottomlines of row r and the toplines of row r+1
// if the latter do not span the whole tabular // if the latter do not span the whole tabular
@ -3081,8 +3081,8 @@ void Tabular::TeXCellPostamble(otexstream & os, idx_type cell,
void Tabular::TeXLongtableHeaderFooter(otexstream & os, void Tabular::TeXLongtableHeaderFooter(otexstream & os,
OutputParams const & runparams, OutputParams const & runparams,
list<col_type> columns, list<col_type> const & columns,
list<col_type> logical_columns) const list<col_type> const & logical_columns) const
{ {
if (!is_long_tabular) if (!is_long_tabular)
return; return;
@ -3164,7 +3164,7 @@ bool Tabular::isValidRow(row_type row) const
void Tabular::TeXRow(otexstream & os, row_type row, void Tabular::TeXRow(otexstream & os, row_type row,
OutputParams const & runparams, OutputParams const & runparams,
list<col_type> columns, list<col_type> logical_columns) const list<col_type> const & columns, list<col_type> const & logical_columns) const
{ {
//output the top line //output the top line
TeXTopHLine(os, row, columns, logical_columns); TeXTopHLine(os, row, columns, logical_columns);

View File

@ -923,8 +923,8 @@ public:
/// ///
bool isValidRow(row_type const row) const; bool isValidRow(row_type const row) const;
/// ///
void TeXRow(otexstream &, row_type const row, void TeXRow(otexstream &, row_type const row, OutputParams const &,
OutputParams const &, std::list<col_type>, std::list<col_type>) const; std::list<col_type> const &, std::list<col_type> const &) const;
/// change associated Buffer /// change associated Buffer
void setBuffer(Buffer & buffer); void setBuffer(Buffer & buffer);
@ -982,19 +982,19 @@ private:
/// ///
// helper function for LaTeX // helper function for LaTeX
/// ///
void TeXTopHLine(otexstream &, row_type row, std::list<col_type>, void TeXTopHLine(otexstream &, row_type row, std::list<col_type> const &,
std::list<col_type>) const; std::list<col_type> const &) const;
/// ///
void TeXBottomHLine(otexstream &, row_type row, std::list<col_type>, void TeXBottomHLine(otexstream &, row_type row, std::list<col_type> const &,
std::list<col_type>) const; std::list<col_type> const &) const;
/// ///
void TeXCellPreamble(otexstream &, idx_type cell, bool & ismulticol, bool & ismultirow, void TeXCellPreamble(otexstream &, idx_type cell, bool & ismulticol, bool & ismultirow,
bool const bidi) const; bool const bidi) const;
/// ///
void TeXCellPostamble(otexstream &, idx_type cell, bool ismulticol, bool ismultirow) const; void TeXCellPostamble(otexstream &, idx_type cell, bool ismulticol, bool ismultirow) const;
/// ///
void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, std::list<col_type>, void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, std::list<col_type> const &,
std::list<col_type>) const; std::list<col_type> const &) const;
}; // Tabular }; // Tabular