patterns: Fixed copying of type decl nodes
This commit is contained in:
parent
95cf828975
commit
a16e387dff
@ -8,7 +8,7 @@ namespace hex::pl {
|
||||
class ASTNodeTypeDecl : public ASTNode,
|
||||
public Attributable {
|
||||
public:
|
||||
ASTNodeTypeDecl(std::string name) : m_forwardDeclared(true), m_name(name) { }
|
||||
ASTNodeTypeDecl(std::string name) : m_forwardDeclared(true), m_name(std::move(name)) { }
|
||||
|
||||
ASTNodeTypeDecl(std::string name, std::shared_ptr<ASTNode> type, std::optional<std::endian> endian = std::nullopt)
|
||||
: ASTNode(), m_name(std::move(name)), m_type(std::move(type)), m_endian(endian) { }
|
||||
@ -17,6 +17,7 @@ namespace hex::pl {
|
||||
this->m_name = other.m_name;
|
||||
this->m_type = other.m_type;
|
||||
this->m_endian = other.m_endian;
|
||||
this->m_forwardDeclared = other.m_forwardDeclared;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::unique_ptr<ASTNode> clone() const override {
|
||||
|
Loading…
Reference in New Issue
Block a user