comparison generator/abstractmetalang.cpp @ 354:18bd68f586c6

removed superfluous destructors
author Max Samukha <maxter@spambox.com>
date Mon, 24 May 2010 23:43:30 +0300
parents c97e5d15bf95
children 9784459f0750
comparison
equal deleted inserted replaced
353:0a671b1382d7 354:18bd68f586c6
1170 1170
1171 bool AbstractMetaClass::generateShellClass() const 1171 bool AbstractMetaClass::generateShellClass() const
1172 { 1172 {
1173 return m_force_shell_class || 1173 return m_force_shell_class ||
1174 (!isFinal() 1174 (!isFinal()
1175 && (hasVirtualFunctions() 1175 && (isPolymorphic()
1176 || hasProtectedFunctions() 1176 || hasProtectedFunctions()
1177 || hasFieldAccessors() 1177 || hasFieldAccessors()
1178 || typeEntry()->isObject())); // qtd2 for being more consistent 1178 || typeEntry()->isObject())); // qtd2 for being more consistent
1179 } 1179 }
1180 1180
1771 *f += AbstractMetaAttributes::FinalInCpp; 1771 *f += AbstractMetaAttributes::FinalInCpp;
1772 } 1772 }
1773 } 1773 }
1774 1774
1775 // Set the class which first declares this function, afawk 1775 // Set the class which first declares this function, afawk
1776 f->setDeclaringClass(sf->declaringClass()); 1776 if (!f->isFinal() && sf->isFinal())
1777 f->setDeclaringClass(f->ownerClass());
1778 else
1779 f->setDeclaringClass(sf->declaringClass());
1777 1780
1778 if (sf->isFinalInTargetLang() && !sf->isPrivate() && !f->isPrivate() && !sf->isStatic() && !f->isStatic()) { 1781 if (sf->isFinalInTargetLang() && !sf->isPrivate() && !f->isPrivate() && !sf->isStatic() && !f->isStatic()) {
1779 // Shadowed funcion, need to make base class 1782 // Shadowed funcion, need to make base class
1780 // function non-virtual 1783 // function non-virtual
1781 if (f->implementingClass() != sf->implementingClass() && f->implementingClass()->inheritsFrom(sf->implementingClass())) { 1784 if (f->implementingClass() != sf->implementingClass() && f->implementingClass()->inheritsFrom(sf->implementingClass())) {