mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code streamlining.
This commit is contained in:
parent
be065cee02
commit
bf14a317b4
1 changed files with 67 additions and 69 deletions
|
@ -84,11 +84,10 @@ public class NonVirtualDestructor extends AbstractIndexAstChecker {
|
||||||
private boolean hasErrorCondition(IASTDeclSpecifier decl) throws DOMException {
|
private boolean hasErrorCondition(IASTDeclSpecifier decl) throws DOMException {
|
||||||
ICPPASTCompositeTypeSpecifier spec = (ICPPASTCompositeTypeSpecifier) decl;
|
ICPPASTCompositeTypeSpecifier spec = (ICPPASTCompositeTypeSpecifier) decl;
|
||||||
className = spec.getName();
|
className = spec.getName();
|
||||||
IBinding binding = className.getBinding();
|
IBinding binding = className.resolveBinding();
|
||||||
if (binding == null) {
|
|
||||||
binding = className.resolveBinding();
|
|
||||||
}
|
|
||||||
if (binding instanceof ICPPClassType) {
|
if (binding instanceof ICPPClassType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ICPPClassType classType = (ICPPClassType) binding;
|
ICPPClassType classType = (ICPPClassType) binding;
|
||||||
virtualMethod = null;
|
virtualMethod = null;
|
||||||
destructor = null;
|
destructor = null;
|
||||||
|
@ -160,7 +159,6 @@ public class NonVirtualDestructor extends AbstractIndexAstChecker {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue