Skip to content

Commit

Permalink
fix some issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongyu1988 committed Feb 21, 2024
1 parent e568051 commit 37e6c37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/graphnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ void GraphNode::AddEdgeToChildNode(std::unique_ptr<GraphEdge> 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)
Expand Down
4 changes: 2 additions & 2 deletions src/graphnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GraphNode

// data handles (not owned)
std::vector<GraphEdge *> _parentEdges; // edges to preceding nodes
ChatBot *_chatBot;
ChatBot _chatBot;

////
//// EOF STUDENT CODE
Expand Down Expand Up @@ -50,7 +50,7 @@ class GraphNode
//// STUDENT CODE
////

void MoveChatbotHere(ChatBot *chatbot);
void MoveChatbotHere(ChatBot chatbot);

////
//// EOF STUDENT CODE
Expand Down

0 comments on commit 37e6c37

Please sign in to comment.