fix missing return value, impl ptr type and protection of SafeBool
authorMichael Andres <ma@suse.de>
Thu, 14 Jun 2007 15:37:20 +0000 (15:37 +0000)
committerMichael Andres <ma@suse.de>
Thu, 14 Jun 2007 15:37:20 +0000 (15:37 +0000)
zypp/Bit.h
zypp/Repository.h
zypp/RepositoryFactory.cc
zypp/Source.h

index 87b7659..bf4caa3 100644 (file)
@@ -159,7 +159,7 @@ namespace zypp
     */
     template<class _IntT>
       class BitField  : public Range<_IntT, 0, MaxBits<_IntT>::value>
-                      , public base::SafeBool<BitField<_IntT> > /* private, but gcc refuses */
+                      , private base::SafeBool<BitField<_IntT> >
       {
         typedef typename base::SafeBool<BitField<_IntT> >::bool_type bool_type;
 
index 14d18d9..3d7f7c3 100644 (file)
@@ -17,8 +17,8 @@ namespace zypp
     DEFINE_PTR_TYPE(RepositoryImpl);
     class RepositoryImpl;
   }
-  
-  class Repository : protected base::SafeBool<Repository> /* private, but gcc refuses */
+
+  class Repository : private base::SafeBool<Repository>
   {
     public:
     friend std::ostream & operator<<( std::ostream & str, const Repository & obj );
@@ -51,11 +51,11 @@ namespace zypp
 
     /** Runtime unique numeric Repository Id. */
     NumericId numericId() const;
-    
+
     const ResStore & resolvables();
-    
+
     const RepoInfo info() const;
-    
+
   private:
     friend base::SafeBool<Repository>::operator bool_type() const;
     /** \ref SafeBool test. */
@@ -74,7 +74,7 @@ namespace zypp
 
   private:
     /** Pointer to implementation */
-    Impl_Ptr _pimpl;
+    RW_pointer<Impl,rw_pointer::Intrusive<Impl> > _pimpl;
   };
 
 }
index 44518cd..dbcbaed 100644 (file)
@@ -15,7 +15,7 @@ RepositoryFactory::~RepositoryFactory()
 
 Repository RepositoryFactory::createFrom( const RepoInfo & context )
 {
-
+  return Repository::noRepository;
 }
 
 } // ns zypp
index 2e188c5..474f8ab 100644 (file)
@@ -106,7 +106,7 @@ namespace zypp
    * \note Source is a reference to the implementation. No COW
    * is performed.
   */
-  class Source_Ref : protected base::SafeBool<Source_Ref> /* private, but gcc refuses */
+  class Source_Ref : private base::SafeBool<Source_Ref>
   {
     friend std::ostream & operator<<( std::ostream & str, const Source_Ref & obj );
     friend bool operator==( const Source_Ref & lhs, const Source_Ref & rhs );