Skip to content

Commit

Permalink
fix bug move edge instead of copy it
Browse files Browse the repository at this point in the history
  • Loading branch information
sol981 committed Apr 1, 2024
1 parent 9c355f1 commit 389caf6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
15 changes: 0 additions & 15 deletions src/chatlogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ ChatLogic::ChatLogic()
//// STUDENT CODE
////

// create instance of chatbot
// _chatBot = new ChatBot("../images/chatbot.png");

// // add pointer to chatlogic so that chatbot answers can be passed on to the GUI
// _chatBot->SetChatLogicHandle(this);

////
//// EOF STUDENT CODE
}
Expand All @@ -32,15 +26,6 @@ ChatLogic::~ChatLogic()
//// STUDENT CODE
////

// delete chatbot instance
// delete _chatBot;

// delete all nodes
// for (auto it = std::begin(_nodes); it != std::end(_nodes); ++it)
// {
// (*it).reset();
// }

////
//// EOF STUDENT CODE
}
Expand Down
5 changes: 1 addition & 4 deletions src/graphnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ GraphNode::~GraphNode()
//// STUDENT CODE
////

// delete _chatBot;
// _chatBot.reset();

////
//// EOF STUDENT CODE
}
Expand All @@ -30,7 +27,7 @@ void GraphNode::AddEdgeToParentNode(const std::shared_ptr<GraphEdge> &edge)

void GraphNode::AddEdgeToChildNode(std::shared_ptr<GraphEdge> edge)
{
_childEdges.push_back(edge);
_childEdges.push_back(std::move(edge));
}

//// STUDENT CODE
Expand Down

0 comments on commit 389caf6

Please sign in to comment.