Changeset 30683 in vbox
- Timestamp:
- Jul 6, 2010 5:46:22 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/ErrorInfo.h
r30682 r30683 124 124 } 125 125 126 ErrorInfo(const ErrorInfo &x); 127 128 virtual ~ErrorInfo(); 126 ErrorInfo(const ErrorInfo &x) 127 { 128 copyFrom(x); 129 } 130 131 virtual ~ErrorInfo() 132 { 133 cleanup(); 134 } 135 136 ErrorInfo& operator=(const ErrorInfo& x) 137 { 138 cleanup(); 139 copyFrom(x); 140 return *this; 141 } 129 142 130 143 /** … … 240 253 void setNull() 241 254 { 242 mIsBasicAvailable = false; 243 mIsFullAvailable = false; 244 245 if (m_pNext) 246 { 247 delete m_pNext; 248 m_pNext = NULL; 249 } 250 251 mResultCode = S_OK; 252 mInterfaceID.clear(); 253 mComponent.setNull(); 254 mText.setNull(); 255 mInterfaceName.setNull(); 256 mCalleeIID.clear(); 257 mCalleeName.setNull(); 258 mErrorInfo.setNull(); 255 cleanup(); 259 256 } 260 257 … … 267 264 m_pNext(NULL) 268 265 { } 266 267 void copyFrom(const ErrorInfo &x); 268 void cleanup(); 269 269 270 270 void init(bool aKeepObj = false); -
trunk/src/VBox/Main/glue/ErrorInfo.cpp
r30682 r30683 44 44 //////////////////////////////////////////////////////////////////////////////// 45 45 46 ErrorInfo::ErrorInfo(const ErrorInfo &x)46 void ErrorInfo::copyFrom(const ErrorInfo &x) 47 47 { 48 48 mIsBasicAvailable = x.mIsBasicAvailable; … … 66 66 } 67 67 68 ErrorInfo::~ErrorInfo() 69 { 68 void ErrorInfo::cleanup() 69 { 70 mIsBasicAvailable = false; 71 mIsFullAvailable = false; 72 70 73 if (m_pNext) 71 74 { … … 73 76 m_pNext = NULL; 74 77 } 78 79 mResultCode = S_OK; 80 mInterfaceID.clear(); 81 mComponent.setNull(); 82 mText.setNull(); 83 mInterfaceName.setNull(); 84 mCalleeIID.clear(); 85 mCalleeName.setNull(); 86 mErrorInfo.setNull(); 75 87 } 76 88
Note:
See TracChangeset
for help on using the changeset viewer.