Sketcher: Constraint improvements
================================= Copy constructor made private, as copies are handled via copy() and clone() methods which generate pointers, not objects. Private copy constructor, used for copy(), made default implementation. Destructor made default. Copy and Clone made non-virtual, as the class does not have children. Added override to persistance inherited virtual functions. move operators explicitly disallowed to note that they are not intended in the current implementation. Perfectly ok to have only private copy constructor for internal use
This commit is contained in:
@@ -74,30 +74,6 @@ Constraint::Constraint()
|
||||
tag = gen();
|
||||
}
|
||||
|
||||
Constraint::Constraint(const Constraint& from)
|
||||
: Value(from.Value),
|
||||
Type(from.Type),
|
||||
AlignmentType(from.AlignmentType),
|
||||
Name(from.Name),
|
||||
First(from.First),
|
||||
FirstPos(from.FirstPos),
|
||||
Second(from.Second),
|
||||
SecondPos(from.SecondPos),
|
||||
Third(from.Third),
|
||||
ThirdPos(from.ThirdPos),
|
||||
LabelDistance(from.LabelDistance),
|
||||
LabelPosition(from.LabelPosition),
|
||||
isDriving(from.isDriving),
|
||||
InternalAlignmentIndex(from.InternalAlignmentIndex),
|
||||
isInVirtualSpace(from.isInVirtualSpace),
|
||||
tag(from.tag)
|
||||
{
|
||||
}
|
||||
|
||||
Constraint::~Constraint()
|
||||
{
|
||||
}
|
||||
|
||||
Constraint *Constraint::clone(void) const
|
||||
{
|
||||
return new Constraint(*this);
|
||||
|
||||
Reference in New Issue
Block a user