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 2011-11-01 20:03:45 -07:00
parent ed8b3356ad
commit 5b9c3d95a5
3 changed files with 7 additions and 8 deletions

View file

@ -168,7 +168,7 @@ public class DeclSpecWriter extends NodeWriter {
}
private String getElabTypeString(int kind) {
switch(kind) {
switch (kind) {
case IASTElaboratedTypeSpecifier.k_enum:
return ENUM;
case IASTElaboratedTypeSpecifier.k_struct:
@ -284,7 +284,7 @@ public class DeclSpecWriter extends NodeWriter {
}
private void writeBaseSpecifiers(ICPPASTBaseSpecifier specifier) {
switch(specifier.getVisibility()) {
switch (specifier.getVisibility()) {
case ICPPASTBaseSpecifier.v_public:
scribe.printStringSpace(PUBLIC);
break;
@ -327,7 +327,7 @@ public class DeclSpecWriter extends NodeWriter {
if (declSpec.isInline()) {
scribe.print(INLINE);
}
switch(declSpec.getStorageClass()) {
switch (declSpec.getStorageClass()) {
case IASTDeclSpecifier.sc_typedef:
scribe.print(TYPEDEF);
break;

View file

@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
*/
public class DeclaratorWriter extends NodeWriter {
private static final String AMPERSAND_SPACE = "& "; //$NON-NLS-1$
private static final String AMPERSAND__AMPERSAND_SPACE = "&& "; //$NON-NLS-1$
private static final String AMPERSAND_AMPERSAND_SPACE = "&& "; //$NON-NLS-1$
private static final String STAR_SPACE = "* "; //$NON-NLS-1$
private static final String PURE_VIRTUAL = " = 0"; //$NON-NLS-1$
private static final String MUTABLE = "mutable"; //$NON-NLS-1$
@ -198,7 +198,7 @@ public class DeclaratorWriter extends NodeWriter {
writePointer(pointOp);
} else if (operator instanceof ICPPASTReferenceOperator) {
if (((ICPPASTReferenceOperator) operator).isRValueReference()) {
scribe.print(AMPERSAND__AMPERSAND_SPACE);
scribe.print(AMPERSAND_AMPERSAND_SPACE);
} else {
scribe.print(AMPERSAND_SPACE);
}

View file

@ -134,14 +134,13 @@ public class MacroExpansionHandler {
PDOMMacroReferenceName mName = (PDOMMacroReferenceName) iIndexName;
int eOff = mName.getFileLocation().getNodeOffset();
int eLength = mName.getFileLocation().getNodeLength();
if (eOff < nOff && Math.abs((eOff+eLength-nOff)) < 3) {
if (eOff < nOff && Math.abs((eOff + eLength - nOff)) < 3) {
scribe.print(mName.toString() + " "); //$NON-NLS-1$
}
}
}
}
}
}
private IASTFileLocation getFileLocation(IASTNode node) {
@ -180,7 +179,7 @@ public class MacroExpansionHandler {
IIndexName[] refs = index.findReferences(macroBinding[0]);
for (IIndexName iIndexName : refs) {
String filename2 = iIndexName.getFileLocation().getFileName();
List<IIndexName>fileList = macroExpansion.get(filename2);
List<IIndexName> fileList = macroExpansion.get(filename2);
if (paths.contains(filename2)) {
if (fileList == null) {
fileList = new ArrayList<IIndexName>();