diff --git a/src/graphnode.cpp b/src/graphnode.cpp index 6d82240f..eea4b5f8 100644 --- a/src/graphnode.cpp +++ b/src/graphnode.cpp @@ -35,10 +35,10 @@ void GraphNode::AddEdgeToChildNode(std::unique_ptr edge) //// STUDENT CODE //// -void GraphNode::MoveChatbotHere(ChatBot *chatbot) +void GraphNode::MoveChatbotHere(ChatBot chatbot) { _chatBot = std::move(chatbot); - _chatBot->SetCurrentNode(this); + _chatBot.SetCurrentNode(this); } void GraphNode::MoveChatbotToNewNode(GraphNode *newNode) diff --git a/src/graphnode.h b/src/graphnode.h index 46302316..857c2d05 100644 --- a/src/graphnode.h +++ b/src/graphnode.h @@ -21,7 +21,7 @@ class GraphNode // data handles (not owned) std::vector _parentEdges; // edges to preceding nodes - ChatBot *_chatBot; + ChatBot _chatBot; //// //// EOF STUDENT CODE @@ -50,7 +50,7 @@ class GraphNode //// STUDENT CODE //// - void MoveChatbotHere(ChatBot *chatbot); + void MoveChatbotHere(ChatBot chatbot); //// //// EOF STUDENT CODE