mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare] Implement Symbol copy constructor
Change-Id: Ie2bef0ba70f11608fd8aebbfa545f6de2e4872bb
This commit is contained in:
@@ -31,6 +31,7 @@ public:
|
||||
static SpecialSymbols matrixSymbol(char index);
|
||||
Symbol(char name);
|
||||
Symbol(Symbol&& other); // C++11 move constructor
|
||||
Symbol(const Symbol& other); // C++11 copy constructor
|
||||
char name() const;
|
||||
Type type() const override;
|
||||
Expression * clone() const override;
|
||||
|
||||
@@ -92,6 +92,11 @@ Symbol::Symbol(Symbol&& other) :
|
||||
{
|
||||
}
|
||||
|
||||
Symbol::Symbol(const Symbol& other) :
|
||||
m_name(other.m_name)
|
||||
{
|
||||
}
|
||||
|
||||
Expression * Symbol::clone() const {
|
||||
return new Symbol(m_name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user