mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
ed8b3356ad
commit
5b9c3d95a5
3 changed files with 7 additions and 8 deletions
|
@ -168,7 +168,7 @@ public class DeclSpecWriter extends NodeWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getElabTypeString(int kind) {
|
private String getElabTypeString(int kind) {
|
||||||
switch(kind) {
|
switch (kind) {
|
||||||
case IASTElaboratedTypeSpecifier.k_enum:
|
case IASTElaboratedTypeSpecifier.k_enum:
|
||||||
return ENUM;
|
return ENUM;
|
||||||
case IASTElaboratedTypeSpecifier.k_struct:
|
case IASTElaboratedTypeSpecifier.k_struct:
|
||||||
|
@ -284,7 +284,7 @@ public class DeclSpecWriter extends NodeWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeBaseSpecifiers(ICPPASTBaseSpecifier specifier) {
|
private void writeBaseSpecifiers(ICPPASTBaseSpecifier specifier) {
|
||||||
switch(specifier.getVisibility()) {
|
switch (specifier.getVisibility()) {
|
||||||
case ICPPASTBaseSpecifier.v_public:
|
case ICPPASTBaseSpecifier.v_public:
|
||||||
scribe.printStringSpace(PUBLIC);
|
scribe.printStringSpace(PUBLIC);
|
||||||
break;
|
break;
|
||||||
|
@ -327,7 +327,7 @@ public class DeclSpecWriter extends NodeWriter {
|
||||||
if (declSpec.isInline()) {
|
if (declSpec.isInline()) {
|
||||||
scribe.print(INLINE);
|
scribe.print(INLINE);
|
||||||
}
|
}
|
||||||
switch(declSpec.getStorageClass()) {
|
switch (declSpec.getStorageClass()) {
|
||||||
case IASTDeclSpecifier.sc_typedef:
|
case IASTDeclSpecifier.sc_typedef:
|
||||||
scribe.print(TYPEDEF);
|
scribe.print(TYPEDEF);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
|
||||||
*/
|
*/
|
||||||
public class DeclaratorWriter extends NodeWriter {
|
public class DeclaratorWriter extends NodeWriter {
|
||||||
private static final String AMPERSAND_SPACE = "& "; //$NON-NLS-1$
|
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 STAR_SPACE = "* "; //$NON-NLS-1$
|
||||||
private static final String PURE_VIRTUAL = " = 0"; //$NON-NLS-1$
|
private static final String PURE_VIRTUAL = " = 0"; //$NON-NLS-1$
|
||||||
private static final String MUTABLE = "mutable"; //$NON-NLS-1$
|
private static final String MUTABLE = "mutable"; //$NON-NLS-1$
|
||||||
|
@ -198,7 +198,7 @@ public class DeclaratorWriter extends NodeWriter {
|
||||||
writePointer(pointOp);
|
writePointer(pointOp);
|
||||||
} else if (operator instanceof ICPPASTReferenceOperator) {
|
} else if (operator instanceof ICPPASTReferenceOperator) {
|
||||||
if (((ICPPASTReferenceOperator) operator).isRValueReference()) {
|
if (((ICPPASTReferenceOperator) operator).isRValueReference()) {
|
||||||
scribe.print(AMPERSAND__AMPERSAND_SPACE);
|
scribe.print(AMPERSAND_AMPERSAND_SPACE);
|
||||||
} else {
|
} else {
|
||||||
scribe.print(AMPERSAND_SPACE);
|
scribe.print(AMPERSAND_SPACE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,14 +134,13 @@ public class MacroExpansionHandler {
|
||||||
PDOMMacroReferenceName mName = (PDOMMacroReferenceName) iIndexName;
|
PDOMMacroReferenceName mName = (PDOMMacroReferenceName) iIndexName;
|
||||||
int eOff = mName.getFileLocation().getNodeOffset();
|
int eOff = mName.getFileLocation().getNodeOffset();
|
||||||
int eLength = mName.getFileLocation().getNodeLength();
|
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$
|
scribe.print(mName.toString() + " "); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private IASTFileLocation getFileLocation(IASTNode node) {
|
private IASTFileLocation getFileLocation(IASTNode node) {
|
||||||
|
@ -180,7 +179,7 @@ public class MacroExpansionHandler {
|
||||||
IIndexName[] refs = index.findReferences(macroBinding[0]);
|
IIndexName[] refs = index.findReferences(macroBinding[0]);
|
||||||
for (IIndexName iIndexName : refs) {
|
for (IIndexName iIndexName : refs) {
|
||||||
String filename2 = iIndexName.getFileLocation().getFileName();
|
String filename2 = iIndexName.getFileLocation().getFileName();
|
||||||
List<IIndexName>fileList = macroExpansion.get(filename2);
|
List<IIndexName> fileList = macroExpansion.get(filename2);
|
||||||
if (paths.contains(filename2)) {
|
if (paths.contains(filename2)) {
|
||||||
if (fileList == null) {
|
if (fileList == null) {
|
||||||
fileList = new ArrayList<IIndexName>();
|
fileList = new ArrayList<IIndexName>();
|
||||||
|
|
Loading…
Add table
Reference in a new issue