commit 2c39859575babfc503b1feb3bd64b3c9886f5930
Author: Georg Baum <[email protected]>
Date:   Mon Jul 7 21:16:10 2014 +0200

    Remove unneeded swap() (thanks Jean-Marc)
    
    std::swap() does exactly the same thing, and avoiding code duplication is
    always good.

diff --git a/src/Length.cpp b/src/Length.cpp
index 10cdd29..0deed74 100644
--- a/src/Length.cpp
+++ b/src/Length.cpp
@@ -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;
diff --git a/src/Length.h b/src/Length.h
index 470c7e1..435eea0 100644
--- a/src/Length.h
+++ b/src/Length.h
@@ -68,8 +68,6 @@ public:
        explicit Length(std::string const & data);
 
        ///
-       void swap(Length & rhs);
-       ///
        double value() const;
        ///
        Length::UNIT unit() const;
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 52c1048..f7f0d24 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -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),
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index 52a90f4..774949c 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -612,8 +612,6 @@ public:
                ///
                CellData & operator=(CellData const &);
                ///
-               void swap(CellData & rhs);
-               ///
                idx_type cellno;
                ///
                int width;

Reply via email to