diff --git a/lib/libimhex/include/hex/pattern_language/ast/ast_node_type_decl.hpp b/lib/libimhex/include/hex/pattern_language/ast/ast_node_type_decl.hpp index 35d4795f2..9922eddd8 100644 --- a/lib/libimhex/include/hex/pattern_language/ast/ast_node_type_decl.hpp +++ b/lib/libimhex/include/hex/pattern_language/ast/ast_node_type_decl.hpp @@ -8,15 +8,16 @@ 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 type, std::optional endian = std::nullopt) : ASTNode(), m_name(std::move(name)), m_type(std::move(type)), m_endian(endian) { } ASTNodeTypeDecl(const ASTNodeTypeDecl &other) : ASTNode(other), Attributable(other) { - this->m_name = other.m_name; - this->m_type = other.m_type; - this->m_endian = other.m_endian; + 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 clone() const override {