mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Cosmetics.
This commit is contained in:
parent
53e2492c02
commit
7e77be0d90
4 changed files with 16 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.core.model.ext;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* QNX - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||
|
||||
|
@ -55,7 +55,7 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
db.putRecPtr(record + CLASS_DEFINITION, classDefName.getRecord());
|
||||
linkage.storeType(record + BASECLASS_TYPE, base.getBaseClassType());
|
||||
|
||||
byte flags = (byte)(base.getVisibility() | (base.isVirtual() ? 4 : 0));
|
||||
byte flags = (byte) (base.getVisibility() | (base.isVirtual() ? 4 : 0));
|
||||
db.putByte(record + FLAGS, flags);
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,6 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
CCorePlugin.log(e);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -166,6 +165,7 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
public PDOMCPPBaseClone(ICPPBase base) {
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinding getBaseClass() {
|
||||
IType type= getBaseClassType();
|
||||
|
@ -174,6 +174,7 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
return (IBinding) type;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IType getBaseClassType() {
|
||||
if (baseClass == null) {
|
||||
|
@ -186,6 +187,7 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
public IName getBaseClassSpecifierName() {
|
||||
return base.getBaseClassSpecifierName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IName getClassDefinitionName() {
|
||||
return base.getClassDefinitionName();
|
||||
|
@ -195,19 +197,23 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase {
|
|||
public int getVisibility() {
|
||||
return base.getVisibility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVirtual() {
|
||||
return base.isVirtual();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBaseClass(IBinding binding) {
|
||||
if (binding instanceof IType)
|
||||
baseClass = (IType) binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBaseClass(IType binding) {
|
||||
baseClass = binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPBase clone() {
|
||||
return new PDOMCPPBaseClone(this);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2012 QNX Software Systems and others.
|
||||
* Copyright (c) 2007, 2013 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -244,7 +244,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
|
|||
return ((ICPPClassSpecializationScope) scope).getBases(point);
|
||||
}
|
||||
|
||||
// This is an explicit specialization
|
||||
// This is an explicit specialization.
|
||||
Long key= record + PDOMCPPLinkage.CACHE_BASES;
|
||||
ICPPBase[] bases= (ICPPBase[]) getPDOM().getCachedResult(key);
|
||||
if (bases != null)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2012 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2013 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -309,8 +309,9 @@ class PDOMCPPClassType extends PDOMCPPBinding implements IPDOMCPPClassType, IPDO
|
|||
|
||||
try {
|
||||
List<PDOMCPPBase> list = new ArrayList<PDOMCPPBase>();
|
||||
for (PDOMCPPBase base = getFirstBase(); base != null; base = base.getNextBase())
|
||||
for (PDOMCPPBase base = getFirstBase(); base != null; base = base.getNextBase()) {
|
||||
list.add(base);
|
||||
}
|
||||
Collections.reverse(list);
|
||||
bases = list.toArray(new ICPPBase[list.size()]);
|
||||
getPDOM().putCachedResult(key, bases);
|
||||
|
|
Loading…
Add table
Reference in a new issue