[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Wed Nov 26 11:59:04 UTC 2003
CVS commit by okellogg:
Remove futile code.
M +4 -6 class.cpp 1.22
M +0 -2 classifier.cpp 1.21
M +0 -5 umlcanvasobject.cpp 1.14
--- kdesdk/umbrello/umbrello/class.cpp #1.21:1.22
@@ -27,8 +27,8 @@ UMLClass::UMLClass(UMLDoc * parent, cons
////////////////////////////////////////////////////////////////////////////////////////////////////
UMLClass::~UMLClass() {
- // we should just call the parent (UMLClassifier) method here instead of being explicit
- m_AttsList.clear();
- m_TemplateList.clear();
- m_OpsList.clear();
+ // The parent (UMLClassifier) destructor is called automatically (C++)
+ // Also, no need for explicitly clear()ing any lists - the QList
+ // destructor does this for us. (Similarly, the QList constructor
+ // already gives us clear()ed lists.)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -262,7 +262,5 @@ void UMLClass::init() {
setStereotype( i18n("class") );
- m_AttsList.clear();
m_AttsList.setAutoDelete(false);
- m_TemplateList.clear();
m_TemplateList.setAutoDelete(false);
--- kdesdk/umbrello/umbrello/classifier.cpp #1.20:1.21
@@ -26,5 +26,4 @@ UMLClassifier::UMLClassifier(UMLDoc * pa
////////////////////////////////////////////////////////////////////////////////////////////////////
UMLClassifier::~UMLClassifier() {
- m_OpsList.clear();
}
@@ -318,5 +317,4 @@ UMLOperationList* UMLClassifier::getFilt
void UMLClassifier::init() {
m_BaseType = ot_UMLObject;
- m_OpsList.clear();
m_OpsList.setAutoDelete(false);
}
--- kdesdk/umbrello/umbrello/umlcanvasobject.cpp #1.13:1.14
@@ -25,6 +25,4 @@ UMLCanvasObject::UMLCanvasObject(UMLDoc
////////////////////////////////////////////////////////////////////////////////////////////////////
UMLCanvasObject::~UMLCanvasObject() {
- m_AssocsList.clear();
- m_TmpAssocs.clear();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -104,9 +102,6 @@ UMLDoc * UMLCanvasObject::getParentUMLDo
////////////////////////////////////////////////////////////////////////////////////////////////////
void UMLCanvasObject::init( UMLDoc * parentDoc ) {
-
m_parentDoc = parentDoc;
- m_AssocsList.clear();
m_AssocsList.setAutoDelete(false);
- m_TmpAssocs.clear();
m_TmpAssocs.setAutoDelete(false);
}
More information about the umbrello-devel
mailing list