Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
emjotde committed Mar 10, 2020
2 parents aad22c9 + cf7f032 commit 8640031
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/common/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# else
# define MAYBE_UNUSED
# endif
#else
# define MAYBE_UNUSED
#endif



#define THREAD_GUARD(body) [&]() { body; }() // test if THREAD_GUARD is neccessary, remove if no problems occur.
#define NodeOp(op) [=]() { op; }

Expand Down
20 changes: 10 additions & 10 deletions src/common/intrusive_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,33 +148,33 @@ inline bool operator!=(const IntrusivePtr<T>& a, const IntrusivePtr<U>& b) {
}

template<class T>
inline bool operator==(const IntrusivePtr<T>& a, T* b) {
return a.get() == b;
inline bool operator==(const IntrusivePtr<T>& a, std::nullptr_t) {
return a.get() == 0;
}

template<class T>
inline bool operator!=(const IntrusivePtr<T>& a, T* b) {
return a.get() != b;
inline bool operator!=(const IntrusivePtr<T>& a, std::nullptr_t) {
return a.get() != 0;
}

template<class T>
inline bool operator==(const IntrusivePtr<T>& a, std::nullptr_t) {
return a.get() == 0;
inline bool operator==(const IntrusivePtr<T>& a, T* b) {
return a.get() == b;
}

template<class T>
inline bool operator!=(const IntrusivePtr<T>& a, std::nullptr_t) {
return a.get() != 0;
inline bool operator!=(const IntrusivePtr<T>& a, T* b) {
return a.get() != b;
}

template<class T>
inline bool operator==(T* a, const IntrusivePtr<T>& b) {
return a == b.get(); // used to say: return b.get(); That cannot be right. [UG]
return a == b.get();
}

template<class T>
inline bool operator!=(T* a, const IntrusivePtr<T>& b) {
return a != b.get(); // used to say: return b.get(); That cannot be right. [UG]
return a != b.get();
}

template<class T, class U>
Expand Down

0 comments on commit 8640031

Please sign in to comment.