Show
Ignore:
Timestamp:
07/31/09 13:06:49 (15 years ago)
Author:
vbarta
Message:

mpdf (& its dependencies) reformat: now using shared_ptr, moved virtual method bodies to .cpp

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/shared_ptr.h

    r420 r461  
    2828template <typename T> 
    2929class shared_ptr { 
     30    template<class U> friend class shared_ptr; 
     31 
    3032private: 
    3133    T *payload; 
     
    5153    //! If other is empty, constructs an empty shared_ptr; otherwise, 
    5254    //! constructs a shared_ptr that shares ownership with other. 
    53     shared_ptr(const shared_ptr &other): 
     55    shared_ptr(const shared_ptr<T> &other): 
     56        payload(other.payload), 
     57        refCnt(other.refCnt) 
     58    { 
     59        add_ref(); 
     60    } 
     61       
     62    //! If other is empty, constructs an empty shared_ptr; otherwise, 
     63    //! constructs a shared_ptr that shares ownership with other. 
     64    template<typename U> 
     65    shared_ptr(const shared_ptr<U> &other): 
    5466        payload(other.payload), 
    5567        refCnt(other.refCnt)