From: Jan Kupec Date: Fri, 5 Sep 2008 08:03:05 +0000 (+0000) Subject: - use shared_ptr instead of the intrusive one X-Git-Tag: BASE-SuSE-Code-11-Branch~460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a46aec43dd442bf58ce3a05b90c62faf6a42995;p=platform%2Fupstream%2Flibzypp.git - use shared_ptr instead of the intrusive one --- diff --git a/zypp/RepoInfo.cc b/zypp/RepoInfo.cc index e51b0c4..89cf329 100644 --- a/zypp/RepoInfo.cc +++ b/zypp/RepoInfo.cc @@ -91,8 +91,6 @@ namespace zypp // /////////////////////////////////////////////////////////////////// - IMPL_PTR_TYPE(RepoInfo); - /////////////////////////////////////////////////////////////////// // // METHOD NAME : RepoInfo::RepoInfo diff --git a/zypp/RepoInfo.h b/zypp/RepoInfo.h index 36d35ce..029991c 100644 --- a/zypp/RepoInfo.h +++ b/zypp/RepoInfo.h @@ -28,8 +28,6 @@ namespace zypp { ///////////////////////////////////////////////////////////////// - DEFINE_PTR_TYPE(RepoInfo); - /////////////////////////////////////////////////////////////////// // // CLASS NAME : RepoInfo @@ -341,6 +339,8 @@ namespace zypp inline bool operator<( const RepoInfo& lhs, const RepoInfo & rhs ) { return lhs.alias() < rhs.alias(); } + typedef shared_ptr RepoInfo_Ptr; + typedef std::list RepoInfoList; ///////////////////////////////////////////////////////////////// diff --git a/zypp/ServiceInfo.cc b/zypp/ServiceInfo.cc index 11d5023..c6ac1d2 100644 --- a/zypp/ServiceInfo.cc +++ b/zypp/ServiceInfo.cc @@ -68,8 +68,6 @@ namespace zypp // /////////////////////////////////////////////////////////////////// - IMPL_PTR_TYPE(ServiceInfo); - const ServiceInfo ServiceInfo::noService; ServiceInfo::ServiceInfo() : _pimpl( new Impl() ) {} diff --git a/zypp/ServiceInfo.h b/zypp/ServiceInfo.h index 9a30b32..2350fb3 100644 --- a/zypp/ServiceInfo.h +++ b/zypp/ServiceInfo.h @@ -23,8 +23,6 @@ namespace zypp { ///////////////////////////////////////////////////////////////// - DEFINE_PTR_TYPE(ServiceInfo); - /////////////////////////////////////////////////////////////////// // // CLASS NAME : ServiceInfo @@ -93,6 +91,8 @@ namespace zypp }; /////////////////////////////////////////////////////////////////// + typedef shared_ptr ServiceInfo_Ptr; + /** \relates ServiceInfo Stream output */ std::ostream & operator<<( std::ostream & str, const ServiceInfo & obj ); diff --git a/zypp/repo/RepoInfoBase.cc b/zypp/repo/RepoInfoBase.cc index 8637419..e6fc49a 100644 --- a/zypp/repo/RepoInfoBase.cc +++ b/zypp/repo/RepoInfoBase.cc @@ -59,8 +59,6 @@ namespace zypp // /////////////////////////////////////////////////////////////////// - IMPL_PTR_TYPE(RepoInfoBase); - /////////////////////////////////////////////////////////////////// // // METHOD NAME : RepoInfoBase::RepoInfoBase diff --git a/zypp/repo/RepoInfoBase.h b/zypp/repo/RepoInfoBase.h index d08f37f..d6fbef2 100644 --- a/zypp/repo/RepoInfoBase.h +++ b/zypp/repo/RepoInfoBase.h @@ -15,7 +15,6 @@ #include #include "zypp/base/PtrTypes.h" -#include "zypp/base/ReferenceCounted.h" #include "zypp/Pathname.h" @@ -26,8 +25,6 @@ namespace zypp namespace repo { ///////////////////////////////////////////////////////////////// - DEFINE_PTR_TYPE(RepoInfoBase); - /////////////////////////////////////////////////////////////////// // // CLASS NAME : RepoInfoBase @@ -36,7 +33,7 @@ namespace zypp * \short Base class implementing common features of \ref RepoInfo and * \ref ServiceInfo. */ - class RepoInfoBase : public base::ReferenceCounted + class RepoInfoBase { friend std::ostream & operator<<( std::ostream & str, const RepoInfoBase & obj ); @@ -155,6 +152,8 @@ namespace zypp inline bool operator<( const RepoInfoBase & lhs, const RepoInfoBase & rhs ) { return lhs.alias() < rhs.alias(); } + typedef shared_ptr RepoInfoBase_Ptr; + ///////////////////////////////////////////////////////////////// } // namespace repo