-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug in overload of addEdge #321
Conversation
…to bugfix_rawptr_addedge
* | ||
* @param Pointer to the node | ||
* | ||
*/ | ||
virtual const std::unordered_set<shared<const Node<T>>, nodeHash<T>> outNeighbors( | ||
shared<const Node<T>> node) const; | ||
virtual const std::unordered_set<shared<const Node<T>>, nodeHash<T>> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> Graph<T>::outNeighbors( | ||
const Node<T> *node) const { | ||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> | ||
Graph<T>::outNeighbors(const Node<T> *node) const { |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 806 with no text in the supplied rule-texts-file
@@ -1385,16 +1397,16 @@ | |||
} | |||
|
|||
template <typename T> | |||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> Graph<T>::outNeighbors( | |||
const Node<T> *node) const { | |||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule
auto node_shared = make_shared<const Node<T>>(*node); | ||
|
||
return outNeighbors(node_shared); | ||
} | ||
|
||
template <typename T> | ||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> Graph<T>::outNeighbors( | ||
shared<const Node<T>> node) const { | ||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> Graph<T>::outNeighbors( | ||
shared<const Node<T>> node) const { | ||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> | ||
Graph<T>::outNeighbors(shared<const Node<T>> node) const { |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 806 with no text in the supplied rule-texts-file
* | ||
* @param Pointer to the node | ||
* | ||
*/ | ||
virtual const std::unordered_set<shared<const Node<T>>, nodeHash<T>> outNeighbors( | ||
const Node<T> *node) const; | ||
virtual const std::unordered_set<shared<const Node<T>>, nodeHash<T>> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> Graph<T>::outNeighbors( | ||
shared<const Node<T>> node) const { | ||
const std::unordered_set<shared<const Node<T>>, nodeHash<T>> | ||
Graph<T>::outNeighbors(shared<const Node<T>> node) const { |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 508 with no text in the supplied rule-texts-file
I noticed that there was a bug in the raw pointer overload of addEdge. Since a shared was created from the data of the input edge, the directionality and weight of the input edge were lost.
Now it's fixed.