diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx index e7ca302468e3..c6c0716a6895 100644 --- a/include/o3tl/cow_wrapper.hxx +++ b/include/o3tl/cow_wrapper.hxx @@ -288,13 +288,13 @@ int cow_wrapper_client::queryUnmodified() const template inline bool operator==( const cow_wrapper& a, const cow_wrapper& b ) { - return a.same_object(b) ? true : *a == *b; + return a.same_object(b) || *a == *b; } template inline bool operator!=( const cow_wrapper& a, const cow_wrapper& b ) { - return a.same_object(b) ? false : *a != *b; + return !a.same_object(b) && *a != *b; } template inline bool operator<( const cow_wrapper& a,