]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make TidyPointer act like other pointers in bool comparison
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Dec 2015 15:42:52 +0000 (07:42 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Dec 2015 15:42:52 +0000 (07:42 -0800)
src/base/TidyPointer.h

index 19334dbeacef0916d182bee3cf64291c8a1d8628..42de97360e23e98d86aa1c3fde310b1f9fd4ab09 100644 (file)
@@ -24,6 +24,7 @@ public:
         :   raw(t) {}
 public:
     bool operator !() const { return !raw; }
+    explicit operator bool() const { return raw; }
     /// Returns raw and possibly NULL pointer
     T *get() const { return raw; }
     /// Address of the raw pointer, for pointer-setting functions