File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,23 @@ struct edgeHash {
57
57
58
58
template <typename T>
59
59
bool operator ==(shared<const Node<T>> p1, shared<const Node<T>> p2) {
60
+ if (p1 == nullptr && p2 == nullptr ) return true ;
61
+ if (p1 == nullptr || p2 == nullptr ) return false ;
60
62
return p1->getUserId () == p2->getUserId ();
61
63
}
62
64
63
65
template <typename T>
64
66
bool operator ==(shared<Node<T>> p1, shared<Node<T>> p2) {
67
+ if (p1 == nullptr && p2 == nullptr ) return true ;
68
+ if (p1 == nullptr || p2 == nullptr ) return false ;
65
69
return p1->getUserId () == p2->getUserId ();
66
70
}
67
71
68
72
template <typename T>
69
73
bool operator ==(shared<const Edge<T>> p1, shared<const Edge<T>> p2) {
74
+ if (p1 == nullptr && p2 == nullptr ) return true ;
75
+ if (p1 == nullptr || p2 == nullptr ) return false ;
76
+
70
77
return p1->getNodePair ().first ->getUserId () ==
71
78
p2->getNodePair ().first ->getUserId () &&
72
79
p1->getNodePair ().second ->getUserId () ==
You can’t perform that action at this time.
0 commit comments