From 1f7825a82909c2b6131441fdb6b1b8b51ed43306 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 24 Apr 2015 12:32:15 +0200 Subject: [PATCH] loplugin:simplifybool Change-Id: I981d5a77cfe74ef81b235963820151cbea55370c --- include/o3tl/cow_wrapper.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,