1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-01-09 18:09:55 -08:00
parent 6985289cff
commit 14d94dafe0
4 changed files with 9 additions and 14 deletions

View file

@ -28,7 +28,6 @@ import org.eclipse.cdt.internal.core.dom.parser.VariableReadWriteFlags;
* with the variable.
*/
public final class CVariableReadWriteFlags extends VariableReadWriteFlags {
private static CVariableReadWriteFlags INSTANCE= new CVariableReadWriteFlags();
public static int getReadWriteFlags(IASTName variable) {
@ -80,8 +79,7 @@ public final class CVariableReadWriteFlags extends VariableReadWriteFlags {
if (indirection == 0) {
if (type instanceof IQualifierType) {
return ((IQualifierType) type).isConst() ? READ : READ | WRITE;
}
else if (type instanceof IPointerType) {
} else if (type instanceof IPointerType) {
return ((IPointerType) type).isConst() ? READ : READ | WRITE;
}
}

View file

@ -35,7 +35,6 @@ import org.eclipse.cdt.internal.core.dom.parser.VariableReadWriteFlags;
* with the variable.
*/
public final class CPPVariableReadWriteFlags extends VariableReadWriteFlags {
private static CPPVariableReadWriteFlags INSTANCE= new CPPVariableReadWriteFlags();
public static int getReadWriteFlags(IASTName variable) {
@ -109,8 +108,7 @@ public final class CPPVariableReadWriteFlags extends VariableReadWriteFlags {
if (indirection == 0) {
if (type instanceof IQualifierType) {
return ((IQualifierType) type).isConst() ? READ : READ | WRITE;
}
else if (type instanceof IPointerType) {
} else if (type instanceof IPointerType) {
return ((IPointerType) type).isConst() ? READ : READ | WRITE;
}
}

View file

@ -21,7 +21,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVariableReadWri
import org.eclipse.cdt.internal.core.pdom.dom.PDOMName;
public class CSearchUtil {
public static int LRU_WORKINGSET_LIST_SIZE= 3;
private static LRUWorkingSets workingSetsCache;
@ -62,8 +61,7 @@ public class CSearchUtil {
boolean isWrite;
if (binding instanceof ICPPVariable) {
isWrite = ((CPPVariableReadWriteFlags.getReadWriteFlags(node) & PDOMName.WRITE_ACCESS) != 0);
}
else {
} else {
isWrite = ((CVariableReadWriteFlags.getReadWriteFlags(node) & PDOMName.WRITE_ACCESS) != 0);
}
return isWrite;

View file

@ -39,7 +39,8 @@ public class LineSearchElement extends PDOMSearchElement {
private final ICElement fEnclosingElement;
private final boolean fIsWriteAccess;
public Match(int offset, int length, boolean isPolymorphicCall, ICElement enclosingElement, boolean isWriteAccess) {
public Match(int offset, int length, boolean isPolymorphicCall, ICElement enclosingElement,
boolean isWriteAccess) {
fOffset = offset;
fLength = length;
fIsPolymorphicCall = isPolymorphicCall;