From 84fc7511250a06a9b2c6afb2948abc8efb6bd0dc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Sep 2015 16:18:34 +0200 Subject: Use explicit to-bool conversion in pointer comparison Since we have explicit operator bool(). --- odb/lazy-ptr.ixx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/odb/lazy-ptr.ixx b/odb/lazy-ptr.ixx index 9ffa945..0cc03f5 100644 --- a/odb/lazy-ptr.ixx +++ b/odb/lazy-ptr.ixx @@ -851,14 +851,14 @@ namespace odb inline bool operator!= (const lazy_unique_ptr& a, std::nullptr_t) { - return a; + return bool (a); // Explicit to-bool conversion. } template inline bool operator!= (std::nullptr_t, const lazy_unique_ptr& b) { - return b; + return bool (b); // Explicit to-bool conversion. } #endif @@ -1391,14 +1391,14 @@ namespace odb inline bool operator!= (const lazy_shared_ptr& p, std::nullptr_t) { - return p; + return bool (p); // Explicit to-bool conversion. } template inline bool operator!= (std::nullptr_t, const lazy_shared_ptr& p) { - return p; + return bool (p); // Explicit to-bool conversion. } #endif -- cgit v1.1