Kaydet (Commit) b3e0ef4c authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

clang-tidy modernize-use-equals-default in basegfx

Change-Id: If4ee51e022eba1f9f36c262abf9ba407db2b158e
Reviewed-on: https://gerrit.libreoffice.org/53260Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 88d0b8ac
......@@ -325,17 +325,9 @@ namespace basegfx
namespace basegfx
{
B2DCubicBezier::B2DCubicBezier(const B2DCubicBezier& rBezier)
: maStartPoint(rBezier.maStartPoint),
maEndPoint(rBezier.maEndPoint),
maControlPointA(rBezier.maControlPointA),
maControlPointB(rBezier.maControlPointB)
{
}
B2DCubicBezier::B2DCubicBezier(const B2DCubicBezier&) = default;
B2DCubicBezier::B2DCubicBezier()
{
}
B2DCubicBezier::B2DCubicBezier() = default;
B2DCubicBezier::B2DCubicBezier(const B2DPoint& rStart, const B2DPoint& rControlPointA, const B2DPoint& rControlPointB, const B2DPoint& rEnd)
: maStartPoint(rStart),
......@@ -345,20 +337,10 @@ namespace basegfx
{
}
B2DCubicBezier::~B2DCubicBezier()
{
}
B2DCubicBezier::~B2DCubicBezier() = default;
// assignment operator
B2DCubicBezier& B2DCubicBezier::operator=(const B2DCubicBezier& rBezier)
{
maStartPoint = rBezier.maStartPoint;
maEndPoint = rBezier.maEndPoint;
maControlPointA = rBezier.maControlPointA;
maControlPointB = rBezier.maControlPointB;
return *this;
}
B2DCubicBezier& B2DCubicBezier::operator=(const B2DCubicBezier&) = default;
// compare operators
bool B2DCubicBezier::operator==(const B2DCubicBezier& rBezier) const
......
......@@ -31,24 +31,13 @@ namespace basegfx
{
};
B2DHomMatrix::B2DHomMatrix()
: mpImpl() // identity
{
}
B2DHomMatrix::B2DHomMatrix() = default;
B2DHomMatrix::B2DHomMatrix(const B2DHomMatrix& rMat) :
mpImpl(rMat.mpImpl)
{
}
B2DHomMatrix::B2DHomMatrix(const B2DHomMatrix&) = default;
B2DHomMatrix::B2DHomMatrix(B2DHomMatrix&& rMat) :
mpImpl(std::move(rMat.mpImpl))
{
}
B2DHomMatrix::B2DHomMatrix(B2DHomMatrix&&) = default;
B2DHomMatrix::~B2DHomMatrix()
{
}
B2DHomMatrix::~B2DHomMatrix() = default;
B2DHomMatrix::B2DHomMatrix(double f_0x0, double f_0x1, double f_0x2, double f_1x0, double f_1x1, double f_1x2)
: mpImpl() // identity
......@@ -61,17 +50,9 @@ namespace basegfx
mpImpl->set(1, 2, f_1x2);
}
B2DHomMatrix& B2DHomMatrix::operator=(const B2DHomMatrix& rMat)
{
mpImpl = rMat.mpImpl;
return *this;
}
B2DHomMatrix& B2DHomMatrix::operator=(const B2DHomMatrix&) = default;
B2DHomMatrix& B2DHomMatrix::operator=(B2DHomMatrix&& rMat)
{
mpImpl = std::move(rMat.mpImpl);
return *this;
}
B2DHomMatrix& B2DHomMatrix::operator=(B2DHomMatrix&&) = default;
double B2DHomMatrix::get(sal_uInt16 nRow, sal_uInt16 nColumn) const
{
......
......@@ -29,36 +29,17 @@ namespace basegfx
{
};
B3DHomMatrix::B3DHomMatrix()
: mpImpl() // identity
{
}
B3DHomMatrix::B3DHomMatrix() = default;
B3DHomMatrix::B3DHomMatrix(const B3DHomMatrix& rMat) :
mpImpl(rMat.mpImpl)
{
}
B3DHomMatrix::B3DHomMatrix(const B3DHomMatrix&) = default;
B3DHomMatrix::B3DHomMatrix(B3DHomMatrix&& rMat) :
mpImpl(std::move(rMat.mpImpl))
{
}
B3DHomMatrix::B3DHomMatrix(B3DHomMatrix&&) = default;
B3DHomMatrix::~B3DHomMatrix()
{
}
B3DHomMatrix::~B3DHomMatrix() = default;
B3DHomMatrix& B3DHomMatrix::operator=(const B3DHomMatrix& rMat)
{
mpImpl = rMat.mpImpl;
return *this;
}
B3DHomMatrix& B3DHomMatrix::operator=(const B3DHomMatrix&) = default;
B3DHomMatrix& B3DHomMatrix::operator=(B3DHomMatrix&& rMat)
{
mpImpl = std::move(rMat.mpImpl);
return *this;
}
B3DHomMatrix& B3DHomMatrix::operator=(B3DHomMatrix&&) = default;
double B3DHomMatrix::get(sal_uInt16 nRow, sal_uInt16 nColumn) const
{
......
......@@ -1104,9 +1104,7 @@ public:
namespace basegfx
{
B2DPolygon::B2DPolygon()
: mpPolygon()
{}
B2DPolygon::B2DPolygon() = default;
B2DPolygon::B2DPolygon(std::initializer_list<basegfx::B2DPoint> aPoints)
: mpPolygon()
......@@ -1117,13 +1115,9 @@ namespace basegfx
}
}
B2DPolygon::B2DPolygon(const B2DPolygon& rPolygon)
: mpPolygon(rPolygon.mpPolygon)
{}
B2DPolygon::B2DPolygon(const B2DPolygon&) = default;
B2DPolygon::B2DPolygon(B2DPolygon&& rPolygon)
: mpPolygon(std::move(rPolygon.mpPolygon))
{}
B2DPolygon::B2DPolygon(B2DPolygon&&) = default;
B2DPolygon::B2DPolygon(const B2DPolygon& rPolygon, sal_uInt32 nIndex, sal_uInt32 nCount)
: mpPolygon(ImplB2DPolygon(*rPolygon.mpPolygon, nIndex, nCount))
......@@ -1133,21 +1127,11 @@ namespace basegfx
OSL_ENSURE(nIndex + nCount <= rPolygon.mpPolygon->count(), "B2DPolygon constructor outside range (!)");
}
B2DPolygon::~B2DPolygon()
{
}
B2DPolygon::~B2DPolygon() = default;
B2DPolygon& B2DPolygon::operator=(const B2DPolygon& rPolygon)
{
mpPolygon = rPolygon.mpPolygon;
return *this;
}
B2DPolygon& B2DPolygon::operator=(const B2DPolygon&) = default;
B2DPolygon& B2DPolygon::operator=(B2DPolygon&& rPolygon)
{
mpPolygon = std::move(rPolygon.mpPolygon);
return *this;
}
B2DPolygon& B2DPolygon::operator=(B2DPolygon&&) = default;
void B2DPolygon::makeUnique()
{
......
......@@ -170,41 +170,22 @@ public:
namespace basegfx
{
B2DPolyPolygon::B2DPolyPolygon()
: mpPolyPolygon()
{
}
B2DPolyPolygon::B2DPolyPolygon() = default;
B2DPolyPolygon::B2DPolyPolygon(const B2DPolyPolygon& rPolyPolygon) :
mpPolyPolygon(rPolyPolygon.mpPolyPolygon)
{
}
B2DPolyPolygon::B2DPolyPolygon(const B2DPolyPolygon&) = default;
B2DPolyPolygon::B2DPolyPolygon(B2DPolyPolygon&& rPolyPolygon) :
mpPolyPolygon(std::move(rPolyPolygon.mpPolyPolygon))
{
}
B2DPolyPolygon::B2DPolyPolygon(B2DPolyPolygon&&) = default;
B2DPolyPolygon::B2DPolyPolygon(const B2DPolygon& rPolygon) :
mpPolyPolygon( ImplB2DPolyPolygon(rPolygon) )
{
}
B2DPolyPolygon::~B2DPolyPolygon()
{
}
B2DPolyPolygon::~B2DPolyPolygon() = default;
B2DPolyPolygon& B2DPolyPolygon::operator=(const B2DPolyPolygon& rPolyPolygon)
{
mpPolyPolygon = rPolyPolygon.mpPolyPolygon;
return *this;
}
B2DPolyPolygon& B2DPolyPolygon::operator=(const B2DPolyPolygon&) = default;
B2DPolyPolygon& B2DPolyPolygon::operator=(B2DPolyPolygon&& rPolyPolygon)
{
mpPolyPolygon = std::move(rPolyPolygon.mpPolyPolygon);
return *this;
}
B2DPolyPolygon& B2DPolyPolygon::operator=(B2DPolyPolygon&&) = default;
void B2DPolyPolygon::makeUnique()
{
......
......@@ -1414,31 +1414,15 @@ namespace basegfx
{
}
B3DPolygon::B3DPolygon(const B3DPolygon& rPolygon) :
mpPolygon(rPolygon.mpPolygon)
{
}
B3DPolygon::B3DPolygon(const B3DPolygon&) = default;
B3DPolygon::B3DPolygon(B3DPolygon&& rPolygon) :
mpPolygon(std::move(rPolygon.mpPolygon))
{
}
B3DPolygon::B3DPolygon(B3DPolygon&&) = default;
B3DPolygon::~B3DPolygon()
{
}
B3DPolygon::~B3DPolygon() = default;
B3DPolygon& B3DPolygon::operator=(const B3DPolygon& rPolygon)
{
mpPolygon = rPolygon.mpPolygon;
return *this;
}
B3DPolygon& B3DPolygon::operator=(const B3DPolygon&) = default;
B3DPolygon& B3DPolygon::operator=(B3DPolygon&& rPolygon)
{
mpPolygon = std::move(rPolygon.mpPolygon);
return *this;
}
B3DPolygon& B3DPolygon::operator=(B3DPolygon&&) = default;
bool B3DPolygon::operator==(const B3DPolygon& rPolygon) const
{
......
......@@ -196,36 +196,20 @@ namespace basegfx
{
}
B3DPolyPolygon::B3DPolyPolygon(const B3DPolyPolygon& rPolyPolygon) :
mpPolyPolygon(rPolyPolygon.mpPolyPolygon)
{
}
B3DPolyPolygon::B3DPolyPolygon(const B3DPolyPolygon&) = default;
B3DPolyPolygon::B3DPolyPolygon(B3DPolyPolygon&& rPolyPolygon) :
mpPolyPolygon(std::move(rPolyPolygon.mpPolyPolygon))
{
}
B3DPolyPolygon::B3DPolyPolygon(B3DPolyPolygon&&) = default;
B3DPolyPolygon::B3DPolyPolygon(const B3DPolygon& rPolygon) :
mpPolyPolygon( ImplB3DPolyPolygon(rPolygon) )
{
}
B3DPolyPolygon::~B3DPolyPolygon()
{
}
B3DPolyPolygon::~B3DPolyPolygon() = default;
B3DPolyPolygon& B3DPolyPolygon::operator=(const B3DPolyPolygon& rPolyPolygon)
{
mpPolyPolygon = rPolyPolygon.mpPolyPolygon;
return *this;
}
B3DPolyPolygon& B3DPolyPolygon::operator=(const B3DPolyPolygon&) = default;
B3DPolyPolygon& B3DPolyPolygon::operator=(B3DPolyPolygon&& rPolyPolygon)
{
mpPolyPolygon = std::move(rPolyPolygon.mpPolyPolygon);
return *this;
}
B3DPolyPolygon& B3DPolyPolygon::operator=(B3DPolyPolygon&&) = default;
bool B3DPolyPolygon::operator==(const B3DPolyPolygon& rPolyPolygon) const
{
......
......@@ -100,22 +100,13 @@ namespace basegfx
std::vector<B2VectorOrientation> maOrient;
};
B2DPolyRange::B2DPolyRange() :
mpImpl()
{}
B2DPolyRange::B2DPolyRange() = default;
B2DPolyRange::~B2DPolyRange()
{}
B2DPolyRange::~B2DPolyRange() = default;
B2DPolyRange::B2DPolyRange( const B2DPolyRange& rRange ) :
mpImpl( rRange.mpImpl )
{}
B2DPolyRange::B2DPolyRange( const B2DPolyRange& ) = default;
B2DPolyRange& B2DPolyRange::operator=( const B2DPolyRange& rRange )
{
mpImpl = rRange.mpImpl;
return *this;
}
B2DPolyRange& B2DPolyRange::operator=( const B2DPolyRange& ) = default;
bool B2DPolyRange::operator==(const B2DPolyRange& rRange) const
{
......
......@@ -388,36 +388,21 @@ namespace utils
mutable Operation mePendingOps;
};
B2DClipState::B2DClipState() :
mpImpl()
{}
B2DClipState::B2DClipState() = default;
B2DClipState::~B2DClipState()
{}
B2DClipState::~B2DClipState() = default;
B2DClipState::B2DClipState( const B2DClipState& rOrig ) :
mpImpl(rOrig.mpImpl)
{}
B2DClipState::B2DClipState( const B2DClipState& ) = default;
B2DClipState::B2DClipState( B2DClipState&& rOrig ) :
mpImpl(std::move(rOrig.mpImpl))
{}
B2DClipState::B2DClipState( B2DClipState&& ) = default;
B2DClipState::B2DClipState( const B2DPolyPolygon& rPolyPoly ) :
mpImpl( ImplB2DClipState(rPolyPoly) )
{}
B2DClipState& B2DClipState::operator=( const B2DClipState& rRHS )
{
mpImpl = rRHS.mpImpl;
return *this;
}
B2DClipState& B2DClipState::operator=( const B2DClipState& ) = default;
B2DClipState& B2DClipState::operator=( B2DClipState&& rRHS )
{
mpImpl = std::move(rRHS.mpImpl);
return *this;
}
B2DClipState& B2DClipState::operator=( B2DClipState&& ) = default;
void B2DClipState::makeNull()
{
......
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