mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code streamlining.
This commit is contained in:
parent
67a81b6a4b
commit
fdeda95079
2 changed files with 7 additions and 14 deletions
|
@ -72,12 +72,8 @@ public class CPPASTAliasDeclaration extends ASTNode implements ICPPASTAliasDecla
|
|||
public ICPPASTAliasDeclaration copy(CopyStyle style) {
|
||||
CPPASTAliasDeclaration copy = new CPPASTAliasDeclaration(
|
||||
aliasName == null ? null : aliasName.copy(style),
|
||||
mappingTypeId == null ? null : mappingTypeId.copy(style));
|
||||
copy.setOffsetAndLength(this);
|
||||
if (style == CopyStyle.withLocations) {
|
||||
copy.setCopyLocation(this);
|
||||
}
|
||||
return copy;
|
||||
mappingTypeId == null ? null : mappingTypeId.copy(style));
|
||||
return copy(copy, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,8 +27,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||
|
||||
/**
|
||||
* Models a function definition without a try-block. If used for a constructor definition it may contain
|
||||
* member initializers.
|
||||
* Models a function definition without a try-block. If used for a constructor definition
|
||||
* it may contain member initializers.
|
||||
*/
|
||||
public class CPPASTFunctionDefinition extends ASTNode
|
||||
implements ICPPASTFunctionDefinition, IASTAmbiguityParent {
|
||||
|
@ -68,16 +68,13 @@ public class CPPASTFunctionDefinition extends ASTNode
|
|||
|
||||
copy.setBody(bodyStatement == null ? null : bodyStatement.copy(style));
|
||||
|
||||
for (ICPPASTConstructorChainInitializer initializer : getMemberInitializers())
|
||||
for (ICPPASTConstructorChainInitializer initializer : getMemberInitializers()) {
|
||||
copy.addMemberInitializer(initializer == null ? null : initializer.copy(style));
|
||||
}
|
||||
|
||||
copy.fDefaulted = fDefaulted;
|
||||
copy.fDeleted = fDeleted;
|
||||
copy.setOffsetAndLength(this);
|
||||
if (style == CopyStyle.withLocations) {
|
||||
copy.setCopyLocation(this);
|
||||
}
|
||||
return copy;
|
||||
return copy(copy, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue