mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Cosmetics.
This commit is contained in:
parent
3427d95db8
commit
acc49b9da2
7 changed files with 43 additions and 47 deletions
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPUsingDirective {
|
||||
|
||||
ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0];
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
|
|||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
/**
|
||||
* Integral c++ type.
|
||||
* Built-in c++ type.
|
||||
*/
|
||||
public class CPPBasicType implements ICPPBasicType, ISerializableType {
|
||||
public static final CPPBasicType BOOLEAN = new CPPBasicType(Kind.eBoolean, 0, null);
|
||||
|
@ -97,7 +97,6 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isSameType(IType object) {
|
||||
if (object == this)
|
||||
return true;
|
||||
|
@ -208,13 +207,11 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
|
|||
return new CPPBasicType(Kind.values()[kind], modifiers);
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public int getQualifierBits() {
|
||||
return getModifiers();
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public int getType() {
|
||||
switch (fKind) {
|
||||
|
@ -239,6 +236,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
|
|||
}
|
||||
return t_unspecified;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated types don't have values
|
||||
*/
|
||||
|
|
|
@ -88,7 +88,7 @@ public abstract class CompositeIndexBinding implements IIndexBinding {
|
|||
}
|
||||
|
||||
public boolean isFileLocal() throws CoreException {
|
||||
return rbinding != null ? rbinding.isFileLocal() : false;
|
||||
return rbinding != null && rbinding.isFileLocal();
|
||||
}
|
||||
|
||||
public IIndexFile getLocalToFile() throws CoreException {
|
||||
|
|
|
@ -233,7 +233,7 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
|
|||
}
|
||||
|
||||
protected IIndexFragmentBinding findOneBinding(IBinding binding) {
|
||||
return super.findOneBinding(binding, false);
|
||||
return findOneBinding(binding, false);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -24,13 +24,13 @@ import org.eclipse.core.runtime.CoreException;
|
|||
public interface IPDOMCPPClassType extends ICPPClassType, IPDOMBinding, IIndexType {
|
||||
|
||||
/**
|
||||
* Visit the children of the class type without using the cache. This method is
|
||||
* Visits the children of the class type without using the cache. This method is
|
||||
* used to populate the cache.
|
||||
*/
|
||||
void acceptUncached(IPDOMVisitor visitor) throws CoreException;
|
||||
|
||||
/**
|
||||
* Return the scope name, for use in {@link IScope#getScopeName()}
|
||||
* Returns the scope name, for use in {@link IScope#getScopeName()}
|
||||
*/
|
||||
IIndexName getScopeName();
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ class PDOMCPPNamespace extends PDOMCPPBinding
|
|||
}
|
||||
|
||||
public ICPPUsingDirective[] getUsingDirectives() {
|
||||
return new ICPPUsingDirective[0];
|
||||
return ICPPUsingDirective.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
public IBinding[] find(String name) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class LineSearchElement extends PDOMSearchElement {
|
|||
if (!(obj instanceof Match))
|
||||
return false;
|
||||
Match m = (Match) obj;
|
||||
return (fOffset == m.fOffset) && (fLength == m.fLength);
|
||||
return fOffset == m.fOffset && fLength == m.fLength;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -142,7 +142,7 @@ public class LineSearchElement extends PDOMSearchElement {
|
|||
if (!(obj instanceof LineSearchElement))
|
||||
return false;
|
||||
LineSearchElement other = (LineSearchElement) obj;
|
||||
return (fOffset == other.fOffset) && (super.equals(obj)) && (fMatches.equals(other.fMatches));
|
||||
return fOffset == other.fOffset && super.equals(obj) && fMatches.equals(other.fMatches);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -220,7 +220,6 @@ public class LineSearchElement extends PDOMSearchElement {
|
|||
|
||||
private static LineSearchElement[] collectLineElements(AbstractCharArray buf, Match[] matches,
|
||||
IIndexFileLocation fileLocation) {
|
||||
|
||||
List<LineSearchElement> result = new ArrayList<LineSearchElement>();
|
||||
List<Match> matchCollector= new ArrayList<Match>();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue