add operator bool() to test for a valid Source&
authorKlaus Kaempf <kkaempf@suse.de>
Fri, 27 Jan 2006 13:48:00 +0000 (13:48 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Fri, 27 Jan 2006 13:48:00 +0000 (13:48 +0000)
zypp/Source.h

index 7ba570e..0d2a6d9 100644 (file)
@@ -87,6 +87,12 @@ namespace zypp
     void disable();
 
     std::string alias (void) const;
+
+    /** Conversion to bool to allow pointer style tests
+     *  for nonNULL \ref resolvable. */
+    operator bool() const
+    { return _pimpl; }
+
   };
   ///////////////////////////////////////////////////////////////////