mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
93a43742a5
commit
2c39859575
@ -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;
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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),
|
||||
|
@ -612,8 +612,6 @@ public:
|
||||
///
|
||||
CellData & operator=(CellData const &);
|
||||
///
|
||||
void swap(CellData & rhs);
|
||||
///
|
||||
idx_type cellno;
|
||||
///
|
||||
int width;
|
||||
|
Loading…
Reference in New Issue
Block a user