mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +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)) {
|
if (!(owner instanceof ICPPClassType)) {
|
||||||
return true; // The binding is not a class member.
|
return true; // The binding is not a class member.
|
||||||
}
|
}
|
||||||
ICPPClassType accessOwner= (ICPPClassType) owner;
|
if (!initialize()) {
|
||||||
if (!initialize(accessOwner)) {
|
|
||||||
return true; // Assume visibility if anything goes wrong.
|
return true; // Assume visibility if anything goes wrong.
|
||||||
}
|
}
|
||||||
|
ICPPClassType accessOwner= (ICPPClassType) owner;
|
||||||
|
namingClass = getNamingClass(accessOwner);
|
||||||
if (namingClass == null) {
|
if (namingClass == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return isAccessible(binding, bindingVisibility, (ICPPClassType) owner, namingClass,
|
return isAccessible(binding, bindingVisibility, accessOwner, namingClass,
|
||||||
v_public, 0);
|
v_public, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@code true} if initialization succeeded.
|
* @return {@code true} if initialization succeeded.
|
||||||
*/
|
*/
|
||||||
private boolean initialize(ICPPClassType accessOwner) {
|
private boolean initialize() {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
if (initializationException != null) {
|
if (initializationException != null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -169,7 +170,6 @@ public class AccessContext {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namingClass = getNamingClass(accessOwner);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue