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