Remove unneeded swap() (thanks Jean-Marc)

std::swap() does exactly the same thing, and avoiding code duplication is
always good.
This commit is contained in:
Georg Baum 2014-07-07 21:16:10 +02:00
parent 93a43742a5
commit 2c39859575
4 changed files with 0 additions and 35 deletions

View File

@ -57,13 +57,6 @@ Length::Length(string const & data)
}
void Length::swap(Length & rhs)
{
std::swap(val_, rhs.val_);
std::swap(unit_, rhs.unit_);
}
string const Length::asString() const
{
ostringstream os;

View File

@ -67,8 +67,6 @@ public:
/// "data" must be a decimal number, followed by a unit
explicit Length(std::string const & data);
///
void swap(Length & rhs);
///
double value() const;
///

View File

@ -628,30 +628,6 @@ Tabular::CellData & Tabular::CellData::operator=(CellData const & cs)
return *this;
}
void Tabular::CellData::swap(CellData & rhs)
{
std::swap(cellno, rhs.cellno);
std::swap(width, rhs.width);
std::swap(multicolumn, rhs.multicolumn);
std::swap(multirow, rhs.multirow);
std::swap(mroffset, rhs.mroffset);
std::swap(alignment, rhs.alignment);
std::swap(valignment, rhs.valignment);
std::swap(decimal_hoffset, rhs.decimal_hoffset);
std::swap(decimal_width, rhs.decimal_width);
std::swap(voffset, rhs.voffset);
std::swap(top_line, rhs.top_line);
std::swap(bottom_line, rhs.bottom_line);
std::swap(left_line, rhs.left_line);
std::swap(right_line, rhs.right_line);
std::swap(usebox, rhs.usebox);
std::swap(rotate, rhs.rotate);
std::swap(align_special, rhs.align_special);
p_width.swap(rhs.p_width);
inset.swap(rhs.inset);
}
Tabular::RowData::RowData()
: ascent(0),
descent(0),

View File

@ -612,8 +612,6 @@ public:
///
CellData & operator=(CellData const &);
///
void swap(CellData & rhs);
///
idx_type cellno;
///
int width;