Cleanup: GPv3: Change order of constructors
This commit is contained in:
@@ -71,8 +71,8 @@ class Drawing : public ::GreasePencilDrawing {
|
||||
public:
|
||||
Drawing();
|
||||
Drawing(const Drawing &other);
|
||||
Drawing &operator=(const Drawing &other);
|
||||
Drawing(Drawing &&other);
|
||||
Drawing &operator=(const Drawing &other);
|
||||
Drawing &operator=(Drawing &&other);
|
||||
~Drawing();
|
||||
|
||||
|
||||
@@ -315,16 +315,6 @@ Drawing::Drawing(const Drawing &other)
|
||||
this->runtime->curve_texture_matrices = other.runtime->curve_texture_matrices;
|
||||
}
|
||||
|
||||
Drawing &Drawing::operator=(const Drawing &other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
std::destroy_at(this);
|
||||
new (this) Drawing(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Drawing::Drawing(Drawing &&other)
|
||||
{
|
||||
this->base.type = GP_DRAWING;
|
||||
@@ -338,6 +328,16 @@ Drawing::Drawing(Drawing &&other)
|
||||
other.runtime = nullptr;
|
||||
}
|
||||
|
||||
Drawing &Drawing::operator=(const Drawing &other)
|
||||
{
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
std::destroy_at(this);
|
||||
new (this) Drawing(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Drawing &Drawing::operator=(Drawing &&other)
|
||||
{
|
||||
if (this == &other) {
|
||||
|
||||
Reference in New Issue
Block a user