mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
d3264a7418
commit
72b6075733
1 changed files with 28 additions and 26 deletions
|
@ -105,11 +105,12 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
||||||
IASTDeclaration [] members = cls.getMembers();
|
IASTDeclaration [] members = cls.getMembers();
|
||||||
ICPPASTVisibilityLabel vis = null;
|
ICPPASTVisibilityLabel vis = null;
|
||||||
for (IASTDeclaration member : members) {
|
for (IASTDeclaration member : members) {
|
||||||
if( member instanceof ICPPASTVisibilityLabel )
|
if (member instanceof ICPPASTVisibilityLabel) {
|
||||||
vis = (ICPPASTVisibilityLabel) member;
|
vis = (ICPPASTVisibilityLabel) member;
|
||||||
else if( member == decl )
|
} else if (member == decl) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (vis != null) {
|
if (vis != null) {
|
||||||
return vis.getVisibility();
|
return vis.getVisibility();
|
||||||
} else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) {
|
} else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) {
|
||||||
|
@ -156,10 +157,11 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
||||||
|
|
||||||
protected ICPPASTDeclSpecifier getDeclSpec(IASTDeclaration decl) {
|
protected ICPPASTDeclSpecifier getDeclSpec(IASTDeclaration decl) {
|
||||||
ICPPASTDeclSpecifier declSpec = null;
|
ICPPASTDeclSpecifier declSpec = null;
|
||||||
if( decl instanceof IASTSimpleDeclaration )
|
if (decl instanceof IASTSimpleDeclaration) {
|
||||||
declSpec = (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration)decl).getDeclSpecifier();
|
declSpec = (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration)decl).getDeclSpecifier();
|
||||||
else if( decl instanceof IASTFunctionDefinition )
|
} else if (decl instanceof IASTFunctionDefinition) {
|
||||||
declSpec = (ICPPASTDeclSpecifier) ((IASTFunctionDefinition)decl).getDeclSpecifier();
|
declSpec = (ICPPASTDeclSpecifier) ((IASTFunctionDefinition)decl).getDeclSpecifier();
|
||||||
|
}
|
||||||
return declSpec;
|
return declSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue