Kaydet (Commit) 45d4b294 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1371223 Missing move assignment operator

and cid#1371216, cid#1371179

Change-Id: I64faaada85cc92a8b47c2a665488f07050be6fc3
üst 9e00f6d7
......@@ -45,6 +45,11 @@ namespace basegfx
{
}
B2DHomMatrix::B2DHomMatrix(B2DHomMatrix&& rMat) :
mpImpl(std::move(rMat.mpImpl))
{
}
B2DHomMatrix::~B2DHomMatrix()
{
}
......@@ -66,6 +71,12 @@ namespace basegfx
return *this;
}
B2DHomMatrix& B2DHomMatrix::operator=(B2DHomMatrix&& rMat)
{
mpImpl = std::move(rMat.mpImpl);
return *this;
}
double B2DHomMatrix::get(sal_uInt16 nRow, sal_uInt16 nColumn) const
{
return mpImpl->get(nRow, nColumn);
......
......@@ -1118,6 +1118,10 @@ namespace basegfx
: mpPolygon(rPolygon.mpPolygon)
{}
B2DPolygon::B2DPolygon(B2DPolygon&& rPolygon)
: mpPolygon(std::move(rPolygon.mpPolygon))
{}
B2DPolygon::B2DPolygon(const B2DPolygon& rPolygon, sal_uInt32 nIndex, sal_uInt32 nCount)
: mpPolygon(ImplB2DPolygon(*rPolygon.mpPolygon, nIndex, nCount))
{
......@@ -1136,6 +1140,12 @@ namespace basegfx
return *this;
}
B2DPolygon& B2DPolygon::operator=(B2DPolygon&& rPolygon)
{
mpPolygon = std::move(rPolygon.mpPolygon);
return *this;
}
void B2DPolygon::makeUnique()
{
mpPolygon.make_unique();
......
......@@ -183,6 +183,11 @@ namespace basegfx
{
}
B2DPolyPolygon::B2DPolyPolygon(B2DPolyPolygon&& rPolyPolygon) :
mpPolyPolygon(std::move(rPolyPolygon.mpPolyPolygon))
{
}
B2DPolyPolygon::B2DPolyPolygon(const B2DPolygon& rPolygon) :
mpPolyPolygon( ImplB2DPolyPolygon(rPolygon) )
{
......@@ -198,6 +203,12 @@ namespace basegfx
return *this;
}
B2DPolyPolygon& B2DPolyPolygon::operator=(B2DPolyPolygon&& rPolyPolygon)
{
mpPolyPolygon = std::move(rPolyPolygon.mpPolyPolygon);
return *this;
}
void B2DPolyPolygon::makeUnique()
{
mpPolyPolygon.make_unique();
......
......@@ -40,6 +40,7 @@ namespace basegfx
public:
B2DHomMatrix();
B2DHomMatrix(const B2DHomMatrix& rMat);
B2DHomMatrix(B2DHomMatrix&& rMat);
~B2DHomMatrix();
/** constructor to allow setting all needed values for a 3x2 matrix at once. The
......@@ -90,6 +91,7 @@ namespace basegfx
// assignment operator
B2DHomMatrix& operator=(const B2DHomMatrix& rMat);
B2DHomMatrix& operator=(B2DHomMatrix&& rMat);
// Help routine to decompose given homogen 3x3 matrix to components. A correction of
// the components is done to avoid inaccuracies.
......
......@@ -54,6 +54,7 @@ namespace basegfx
/// diverse constructors
B2DPolygon();
B2DPolygon(const B2DPolygon& rPolygon);
B2DPolygon(B2DPolygon&& rPolygon);
B2DPolygon(const B2DPolygon& rPolygon, sal_uInt32 nIndex, sal_uInt32 nCount);
B2DPolygon(std::initializer_list<basegfx::B2DPoint> rPoints);
......@@ -61,6 +62,7 @@ namespace basegfx
/// assignment operator
B2DPolygon& operator=(const B2DPolygon& rPolygon);
B2DPolygon& operator=(B2DPolygon&& rPolygon);
/// unshare this polygon with all internally shared instances
void makeUnique();
......
......@@ -49,11 +49,13 @@ namespace basegfx
public:
B2DPolyPolygon();
B2DPolyPolygon(const B2DPolyPolygon& rPolyPolygon);
B2DPolyPolygon(B2DPolyPolygon&& rPolyPolygon);
explicit B2DPolyPolygon(const B2DPolygon& rPolygon);
~B2DPolyPolygon();
// assignment operator
B2DPolyPolygon& operator=(const B2DPolyPolygon& rPolyPolygon);
B2DPolyPolygon& operator=(B2DPolyPolygon&& rPolyPolygon);
/// unshare this poly-polygon (and all included polygons) with all internally shared instances
void makeUnique();
......
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