Add success flag for addEdge#532
Conversation
|
I don't understand your fix, can you explain me? |
Sorry maybe I misunderstood the original issue. I thought the problem was when the optional values were not set, thus leading us to not know if the edge is directed or weighted (leading to an error). I didn't really understand where addEdge would ever return false for unsuccessful in any other case. Could you expand on this? |
|
we could return the boolean flag that is returned by the insert function ( https://en.cppreference.com/w/cpp/container/unordered_map/insert.html ), obviously when it returns false the function does not update the cached adjacency matrix. |
|
Please, take in consideration also to the Issue #533 , that I have opened just now |
|
I close this one, because the #542 have also the correction for issue #521 @danielsuh05 |
Fixes Issue #521.
If either
std::optionals are not set, return false, else continue normally. Adds this test as well.