mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 466861 - Some minor code cleanup in AccessContext
Change-Id: I10145cc5d739d55e7f1594d6747fd9c1b73c7f05 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
parent
08301be2c6
commit
165175210d
1 changed files with 5 additions and 5 deletions
|
@ -141,21 +141,22 @@ public class AccessContext {
|
|||
if (!(owner instanceof ICPPClassType)) {
|
||||
return true; // The binding is not a class member.
|
||||
}
|
||||
ICPPClassType accessOwner= (ICPPClassType) owner;
|
||||
if (!initialize(accessOwner)) {
|
||||
if (!initialize()) {
|
||||
return true; // Assume visibility if anything goes wrong.
|
||||
}
|
||||
ICPPClassType accessOwner= (ICPPClassType) owner;
|
||||
namingClass = getNamingClass(accessOwner);
|
||||
if (namingClass == null) {
|
||||
return true;
|
||||
}
|
||||
return isAccessible(binding, bindingVisibility, (ICPPClassType) owner, namingClass,
|
||||
return isAccessible(binding, bindingVisibility, accessOwner, namingClass,
|
||||
v_public, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if initialization succeeded.
|
||||
*/
|
||||
private boolean initialize(ICPPClassType accessOwner) {
|
||||
private boolean initialize() {
|
||||
if (context == null) {
|
||||
if (initializationException != null) {
|
||||
return false;
|
||||
|
@ -169,7 +170,6 @@ public class AccessContext {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
namingClass = getNamingClass(accessOwner);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue