Changeset 1219
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/SVN.cc
r1218 r1219 46 46 47 47 SVNException::SVNException(const std::string& msg, svn_error_t* error) 48 : std::runtime_error(""), error_(error), msg_(msg) {} 49 50 51 SVNException::~SVNException(void) throw() {} 48 : std::runtime_error(""), error_(error), msg_(msg) 49 { 50 ref_count_ = new int(1); 51 } 52 53 SVNException::SVNException(const SVNException& other) 54 : std::runtime_error(other), error_(other.error_), msg_(other.msg_), 55 ref_count_(other.ref_count_) 56 { 57 ++(*ref_count_); 58 } 59 60 61 SVNException::~SVNException(void) throw() 62 { 63 --ref_count_; 64 if (!ref_count_) { 65 delete ref_count_; 66 ref_count_=NULL; 67 svn_error_clear(error_); 68 error_=SVN_NO_ERROR; 69 } 70 } 52 71 53 72 -
trunk/lib/SVN.h
r1218 r1219 53 53 SVNException(const std::string& msg, svn_error_t* error=NULL); 54 54 55 /** 56 Copy constructor 57 */ 58 SVNException(const SVNException& other); 59 60 /** 61 Destructor 62 */ 55 63 virtual ~SVNException(void) throw(); 64 56 65 /** 57 66 override base implementation … … 66 75 svn_error_t* error_; 67 76 std::string msg_; 77 int* ref_count_; 78 79 // assignment not allowed 80 SVNException& operator=(const SVNException&); 68 81 }; 69 82
Note: See TracChangeset
for help on using the changeset viewer.